What I think we sould be aiming for is a reobust solution that
actually works for production sites with as many coding styles as
possible. Sure it's possible in a number of ways to get around the
current problems, but as Sam notes there are alternate problems with
these.
Sam - I think putting selectors in an ie only stylesheet defeats the
purpose of an ie only stylesheet. You may as well just include them in
the main stylesheet and reduce the number of concurrent downloads for
a page.
However, I think your idea of allowing an arguement for
Requirements::CSS would be excellent. If you're recommending a method
for people to incorporate compatibility stylesheets, we should be
steering them away from using hacks and 'selectors' (let's face it,
hacks again) to target a specific browser. Yes they will work, but for
how long? I don't want to get into a debate over whether hacks are
better than conditional comments, suffice to say that I think MS
conditional comments are a cleaner solution to the problem and
represent a 'best practice' senario. I'm unsure why you would ever
need to have a Firefox only stylesheet - most non-IE browsers do a
really good job of sticking to the W3C specs, so I think this would be
inviting poor CSS practices. And yet, I'm sure there are people around
who do use said methods (bizarrely). So perhaps using $Requirements as
well as allowing arguements for Requirements::CSS would be the best
holistic solution?
Here's a big question - if you do allow arguements to
Requirements::CSS, there are going to have to be a few different
options, so how will SS handle them? Eg:
* IE 5, IE 5.5000, IE 6, IE 7, IE 8 - all the different IE versions
* lt IE 7 - the 'LESS THAN' operator
* gt IE 6 - the 'GREATER THAN' operator
* lte IE 6 - the 'LESS THAN OR EQUAL TO' operator
* gte IE 6 - the 'GREATER THAN OR EQUAL TO' operator
* !(IE7) - the 'NOT' Operator
* (gt IE 5)&(lt IE 7) - the 'AND' operator
* (IE 6)|(IE 7) - the 'OR' operator
* <!--[if expression]> HTML <![endif]--> - the DOWNLEVEL HIDDEN
comment
* <![if expression]> HTML <![endif]> - the DOWNLEVEL REVEALED
comment
Will these need to be hard coded, or will SS just insert the exact
arguement as written into the MSCC? How will SS handle downlevel
hidden vs revealed? So many questions.... :)
Michael