4 ms·
I guess you're correct, but it just feels better to me knowing I'm working from a clean slate, then accepting whatever padding, line spacing, font size, and mar
by euroclydon 17y ago
I guess you're correct, but it just feels better to me knowing I'm working from a clean slate, then accepting whatever padding, line spacing, font size, and margins that browser though would look nice.
I found that my CSS skills really improved when I added a style reset and was forced to contemplate all the styles which were previously given to me without consideration by the browser.
- robin_reala 17y agoThat’s a fair point, they are useful as a learning aid. It’s just important to bear in mind that not only are reset stylesheets not required in the long run but they’re actively inefficient.
- ubernostrum 17y agoA reset is a form of future-proofing. If a new browser, or new browser version, appears with its own ideas about default values for margin, padding, etc., then so long as its CSS support is decent your existing reset will make it either mostly or completely work from day one. This does not mean "never do browser testing" -- you should (and you should do it smartly, based on what's known about both the browsers and your demographics) -- but it does mean that you're less likely to get caught with your pants down. Also, for my money, the best regime out there for classifying browsers and organizing a testing system is Yahoo's graded browser support. And oddly enough, they seem to like resets...
- robin_reala 17y agoA good point. Still, it always comes down to a cost/benefit equation. Balancing the cost of a sending every user a set of reset styles in terms of extra page weight against the benefit of some possible future-proofing against some possible browsers then my choice would be to go with the lighter site.
- ubernostrum 17y agoIf your CSS is minified and compressed, a reset is almost unnoticeably small. The YUI 3 reset stylesheet, for example, is 858 bytes uncompressed.