- 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
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 UTC