- From: Jeffrey Yasskin <jyasskin@hotmail.com>
- Date: Sat, 28 Jul 2001 12:52:53 -0500
- To: "'Ian Hickson'" <ian@hixie.ch>, <www-style@w3.org>, <m.batsis@bsnet.gr>, <tantek@cs.stanford.edu>
>From: Ian Hickson <ian@hixie.ch> >To: Jeffrey Yasskin <jyasskin@hotmail.com> >CC: <www-style@w3.org> >Subject: Re: @version rule >Date: Fri, 27 Jul 2001 23:11:54 -0700 (Pacific Daylight Time) > >On Fri, 27 Jul 2001, Jeffrey Yasskin wrote: > > > > [ @version ] > >Here are reasons why this won't work: > > 1. Existing UAs don't support it. > > The following: > > @version 1 { > p { color: blue; } > } > > ...would never cause a paragraph to be blue, since existing UAs would > drop the entire rule (it's not valid in the version of CSS they > support) and future UAs wouldn't mark themselves as CSS1-only UAs. > > You're mostly right. That's why a stylesheet intended to be backwards-compatible with CSS1 browsers would have to be formed like: ---- @version "1"; /*ignored by old browsers*/ /*CSS 1 rules. Still applied by newer browsers but in CSS1-compatibility mode*/ @version "3" { /* everything in here is ignored by old browsers * CSS 3 rules * this should be processed in CSS 3-compatible mode by future, CSS 4+ browsers. * The @version rule does not mean only browsers at this level; it means browsers that understand this level */ } ---- > 2. UAs don't implement a whole level at a time. > > Point me to a *single* CSS1 UA. There aren't ANY. There are lots of > UAs that implement parts of CSS1, CSS2 and even CSS3, but none that > implement a single layer. Which level should IE6 claim to support? Unfortunately, this is true. It means that your "creative" way of selecting CSS3 browsers doesn't work either. A current browser could be written, however, to completely ignore rules designed for CSS 4, which it knows it doesn't support. At least an @version rule tells the browser what version the following rules are designed for. Then it can more intelligently decide which attributes to apply. An @supports <attribute>|<@-rule>|<selector> rule might solve this problem, but I think it would be too complicated. > > > 3. You can already do it if you are creative. > > For example, using @media rules: > > /* CSS1 rules here */ > > @media all { > /* CSS2 rules here */ > } > > @media all and (some: media-query) { > /* CSS3 rules here */ > } > > ...or @import rules: > > @charset "ISO-8859-1"; > @import "css2"; > @import "css3" all and (some: media-query); > /* css1 */ Why should authors have to be "creative" in order to remain backwards-compatible? The obvious goal of these media rule tricks is to select rules based on the CSS version supported. Why not allow authors to do the same thing in an intuitive way? The differences between CSS 1 and CSS 2 were significant enough that distinguishing the versions was relatively easy. CSS 3 changed the @media rules enough to be able to do the same thing. What will CSS 4 change in order to distinguish the versions? CSS 5? What if a future CSS version only changes attributes? How do you distinguish the versions then? > >All three of these issues are, alone, important enough to prevent this >from being added to the spec. Together, however, they show that the idea >is unworkable and not needed. This is in addition to the existing forward- >compatability guidelines and the fact that, as you (I think) pointed out, >the working group is trying to make sure that extensions remain backwards >compatible as well. The CSS working group is making sure that extensions remain backwards-compatible by throwing out extensions that are hard to implement in a backwards-compatible way. I'd rather see the working group try to maintain backwards-compatibility if possible, but be able to add extensions even if they cannot be backwards-compatible. >From: "Tantek Celik" <tantek@cs.stanford.edu> >Two misconceptions here. > >1. :first-child is a pseudo-class, NOT pseudo-element. Oops. I meant (:):first-letter. Sorry. > >2. Single ':' variants of CSS2 pseudo-elements are still supported in CSS3 >(and beyond) as Peter pointed out. They're only supported because otherwise legacy stylesheets would break. The @version rule presents another alternative. >From: "Manos Batsis" <m.batsis@bsnet.gr> >Date: Sat, 28 Jul 2001 15:53:33 +0300 >Yeah, make the style break on developers. That will show em. I seem to recall that IE5 came under a lot of fire because it supported bad HTML. IE6, Mozilla, and Opera are considered "better" browsers because they don't render broken HTML. Isn't the same true of CSS? A stylesheet without an @version rule at the top would be considered legacy and so wouldn't trigger "strict" mode. Jeffrey Yasskin
Received on Saturday, 28 July 2001 13:52:59 UTC