4

The question covers most of it, but I'm trying to present a well articulated argument towards a senior developer who wants to abandon conditional stylesheets altogether (IE6, mobile, etc). Bear in mind we're not actually eliminating IE6, just the stylesheet.

Or am I being crazy and should just accept this?

Mike Robinson
  • 24,971
  • 8
  • 61
  • 83

5 Answers5

4

What is the alternative? CSS hacks?

I have conditional stylesheets for IE7 and IE6. This compartmentalizes fixes for those specific browsers. When making changes, it easily lets you test/fix in standards browsers, test/fix in IE7, then test/fix in IE6. Testing flows more naturally. It doesn't break standards, it's easy, and it's basically free. It makes more sense to explain why you wouldn't use them.

Samantha Branham
  • 7,350
  • 2
  • 32
  • 44
  • This is my concern - he has not presented alternatives – Mike Robinson Feb 09 '09 at 02:09
  • Depending on office politics, I would probably call him out on it. It's not a fight to lose your job over, but as bigmattyh pointed out, you'll lose a considerable amount of development time hacking the site into functionality compared to doing it The Right Way. – Samantha Branham Feb 09 '09 at 02:40
1

You may want to look into the Yahoo Reset CSS Library. It has eliminated the need for conditional stylesheets on many of the projects I've done.

Chris
  • 553
  • 4
  • 5
0

You shouldn't. With enough work, both of the popular browsers can be made to render a page the same way. Take mine for example - Complex yet simple at the same time.

[edit: changed 'never' to 'you shouldn't', having thought the title said 'when']

tsilb
  • 7,977
  • 13
  • 71
  • 98
  • How do you account for IE6-specific bugs like double margining and the broken box model without convoluted, divitis-inducing workarounds? – Samantha Branham Feb 09 '09 at 02:09
  • Agreed with the above. "Never" doesn't always make sense for every design. Also, it doesn't make sense to spend 3-4 hours of time on an IE-specific problem that can be fixed in 5 minutes with a targeted CSS rule in a conditional stylesheet. – Matt Howell Feb 09 '09 at 02:11
  • Yeah and ugly, I'm not so sure I would be toting that as an example of a site that doesn't have conditional CSS. – Justin Yost Feb 09 '09 at 02:15
  • And how is it complex? I don't see anything inherently complex about it, unless you mean how to follow it. – Justin Yost Feb 09 '09 at 02:17
  • Agreed, I wouldn't go beating my chest with a site that looks like that. – patricksweeney Feb 09 '09 at 02:25
  • I didn't say it looked nice, I said it looks the same in IE6/7 and FF. – tsilb Feb 09 '09 at 02:29
  • I wonder why people downvote this valid opinion. If you disagree, just vote up the other one. – buti-oxa Feb 09 '09 at 02:43
  • @buti-oxa: I agree. I'm surprised that this is being down-voted. I understand that some layouts need browser-specific styling to work around bugs, but that doesn't mean that one should *try* to get as browser-neutral as possible and use browser-specific only when truly necessary. – Eddie Feb 09 '09 at 03:27
  • Sorry I gotta agree with the others here - the sites I work on have to be pixel perfect and tableless. It's not really a solution to make it ugly across all browsers. – Mike Robinson Feb 09 '09 at 06:13
  • "pixel perfect" is an utterly ridiculous requirement. You guys must waste loads of time that could be better spent. (That being said, I agree most closely with @Eddie's comment, above). – Traingamer Feb 09 '09 at 20:24
0

If you can meet your needs without conditional style sheets, then by all means it's a good idea to have a single style sheet for all browsers. However, if you cannot do this without losing functionality, then a pretty good argument would have to be presented to justify going to a single style sheet.

Eddie
  • 53,828
  • 22
  • 125
  • 145
0

Because IE 6 and IE 7 are broken in various well known ways. Conditional Stylesheets that modularize the fixes are the easiest and supported way to deal with these breaks.

When you say your senior developer wants to "abandon" conditional stylesheets, what exactly does that mean?

Breton
  • 15,401
  • 3
  • 59
  • 76