Re:CSS Techniques I Wish I Knew When I Started Designing Web...
by Semiapies on Tuesday December 22, 2009 @04:04PM
(#1010798)
I wouldn't worry about it for existing sites, but it's a good start for the CSS in a new site.
EDIT: or full overhaul of an existing site.
Re:CSS Techniques I Wish I Knew When I Started Designing Web...
by robin_reala on Tuesday December 22, 2009 @12:26PM
(#1010284)
They don’t really. If you’re browser checking your build then you should uncover any inconsistencies that your actual stylesheet hasn’t covered. Once you’ve fixed those then you have no need for the reset stylesheet in the first place.
Re:CSS Techniques I Wish I Knew When I Started Designing Web...
by angelbob on Tuesday December 22, 2009 @02:21PM
(#1010530)
Hm. I'm dubious about "testing will find all the problems" as a solution here. Isn't that a little like saying "you need to check JavaScript in all browsers anyway, so why use a compatibility library?"
Re:CSS Techniques I Wish I Knew When I Started Designing Web...
by robin_reala on Wednesday December 23, 2009 @04:06AM
(#1011819)
The compatibility issues between JS implementations in browsers are much worse than between CSS implementations. Besides, most JS libraries add additional functionality. There is one library that just tries to normalise a base set of JS across browsers (Dean Edward’s Base2) but no-one uses it.
Re:CSS Techniques I Wish I Knew When I Started Designing Web...
by euroclydon on Tuesday December 22, 2009 @12:31PM
(#1010295)
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.
Re:CSS Techniques I Wish I Knew When I Started Designing Web...
by robin_reala on Wednesday December 23, 2009 @04:07AM
(#1011822)
That’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.
Re:CSS Techniques I Wish I Knew When I Started Designing Web...
by ubernostrum on Wednesday December 23, 2009 @04:21AM
(#1011831)
A 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...
Re:CSS Techniques I Wish I Knew When I Started Designing Web...
by robin_reala on Wednesday December 23, 2009 @04:37AM
(#1011839)
A 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.
Re:CSS Techniques I Wish I Knew When I Started Designing Web...
by ubernostrum on Wednesday December 23, 2009 @03:42PM
(#1012796)
If your CSS is minified and compressed, a reset is almost unnoticeably small. The YUI 3 reset stylesheet, for example, is 858 bytes uncompressed.
Re:CSS Techniques I Wish I Knew When I Started Designing Web...
by adamhowell on Tuesday December 22, 2009 @01:09PM
(#1010370)
Different browsers have different defaults for things like checkbox padding & margin, line-height, etc.
A reset stylesheeet gets rid of those. I don't start a site w/o one.
Re:CSS Techniques I Wish I Knew When I Started Designing Web...
by robin_reala on Wednesday December 23, 2009 @04:09AM
(#1011825)
Yes, they do, but you don’t need to reset them first then set them again. You can just set them to your own choice and be done with it.
Re:CSS Techniques I Wish I Knew When I Started Designing Web...
by abossy on Tuesday December 22, 2009 @10:08PM
(#1011415)
Quickly loading up Google Analytics shows me that visitors to my site have used 9 browsers (excluding version #), 6 OSes, and 41 screen resolutions in the past month. The time it takes to cover that matrix of viewing combinations simply isn't worth the investment and hence a reset sheet should save you a lot of time.
Re:CSS Techniques I Wish I Knew When I Started Designing Web...
by robin_reala on Wednesday December 23, 2009 @04:08AM
(#1011824)
So you’re saying you don’t support all these browsers? A reset stylesheet isn’t a magical fix for every issue - you still need to check in the browsers your users have chosen. That’s part of the pain of being a front end developer: you’re not just coding for one consumer.
Apparently I need to start doing that. Like, yesterday.