Joined June 2011
·

David Avellaneda

monoku
·
bogotá
·
·
·

Posted to Bye Bye CSS Box Model... over 1 year ago

@nikola @magnetikonline well, you know what? you are all right! I found this article from Todd Angling [http://www.kendoui.com/blogs/teamblog/posts/12-09-28/css_tip_star_selector_not_that_bad.aspx] where he reveals the results from many experiments with CSS in different scenarios. Is really good to know that the use of universal selector have unnoticeable impact in performance.

Posted to Bye Bye CSS Box Model... over 1 year ago

@magnetikonline I disagree because of merely logic, using a rule like * applies to every element in your DOM, which at the end is one of the more expensive tasks you can do. Thats why at the end is better to use a normalization of elements, like Normalize.css than use a reset ( my opinion @elad2412 ).

I wrote a post about universal selectors: http://monoku.tumblr.com/post/18624340662/universal-selectors but even one year later I have found that is better to use Normalize.css than use any other reset css.

Finally, I quote Mozzilla: "Use the universal selector very carefully, as it is the most expensive CSS selector in terms of webpage performance."[https://developer.mozilla.org/en-US/docs/Web/CSS/Universal_selectors]

Posted to Bye Bye CSS Box Model... over 1 year ago

Well, this remind me this article from Paul Irish http://www.paulirish.com/2012/box-sizing-border-box-ftw/ but I don't know, I've always thought that universal selectors have a heavy performance impact, more if we are changing layout, which implies reflow.

So I consider this solution a bad practice, I can't say I don't use the border-sizing property, I use it where I need it, but not everywhere!

Achievements
71 Karma
0 Total ProTip Views