W3C home > Mailing lists > Public > www-style@w3.org > April 2005

Re: Targeting CSS3 only (evil?), either with pseudoclass or an extra syntax for properties.

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 6 Apr 2005 21:19:18 +0000 (UTC)
To: Ryan Cannon <ryan@ryancannon.com>
Cc: www-style@w3.org
Message-ID: <Pine.LNX.4.61.0504062117270.27724@dhalsim.dreamhost.com>

On Wed, 6 Apr 2005, Ryan Cannon wrote:
> 
> I believe this lack of versioning/support testing is going to be the 
> critical problem in CSS3 gaining widespread adoption. While !required is 
> a good idea, it seems a bit complex. Any reason the @module syntax[1] 
> was not picked up? It seems fairly elegant. One use-case could be:
> 
> body {
>    background-color: white;
>    background-image: url('main_bg.png');
>    background-position: top left;
>    background-repeat: repeat
> }
> @module css3-backgrounds-and-borders {
>    body {
>        background-image: url('flower.png'), url('ball.png'),
> url('main_bg.png');
>        background-position: bottom right, center, top left
>        background-repeat: no-repeat, no-repeat, repeat
>    }
> }

The above is unnecessary. Just do:

  body {
    background-color: white;

    /* CSS2 */
    background-image: url('main_bg.png');
    background-position: top left;
    background-repeat: repeat

    /* CSS3 */
    background-image: url('flower.png'), url('ball.png'), url('main_bg.png');
    background-position: bottom right, center, top left
    background-repeat: no-repeat, no-repeat, repeat
  }

...and it'll work exactly as you wanted it to. Any UA that spports the 
multiple-value syntax will use the second set, and any compliant UA that 
doesn't will use the first set instead.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 6 April 2005 21:19:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:36 GMT