4 ms·
Are there any speed/performance implications for doing: * { margin:0; padding:0; } Every single element rendered would be affected by this, especially if
by chime 18y ago
Are there any speed/performance implications for doing:
* { margin:0; padding:0; }
Every single element rendered would be affected by this, especially if there are more rules in the global wildcard like font-family, border, color etc.
- seldo 18y agoCSS rule declarations of this kind are very, very fast; when rendering without your rules the browser is simply using a different default.css file internally, so it makes no difference (less the time taken to load the CSS file itself). Nearly every page on Yahoo uses an expanded form of the above to reset and standardize margins, borders and padding across browsers. In fact, we give it away for anyone to use: http://developer.yahoo.com/yui/reset/ http://developer.yahoo.com/yui/reset/