W3C home > Mailing lists > Public > www-style@w3.org > May 2008

Re: [css3-background] box-shadow syntax

From: Eli Morris-Heft <dai@doublefishstudios.com>
Date: Wed, 07 May 2008 08:38:42 -0500
Message-ID: <4821B0E2.8040302@doublefishstudios.com>
To: www-style@w3.org

Bert Bos wrote:
> [grammar 2:]
> 
>     none | <shadow> [ , <shadow> ]*
> 
> where
> 
>     <shadow> = <length> <length> <length>? <color>? |
>                <color> <length> <length> <length>?
> 
> (I think the grammar for 'text-shadow' in the Text module is like this; 
> and indeed I believe the grammar for 'text-shadow' and 'box-shadow' 
> should be the same.)

It is (with the exception of a dropped question mark after '<color>' in the 
second line), though

<shadow> = <length> <length> <length>? || <color>

may be more concise.

> [box-shadow], a non-zero default offset, could say that an omitted offset 
> defaults to '1px 1px', or to a UA-dependent value.

As an author, I actually like a default of '0 0' for this, on analogy with the 
default of 'border-style' being 'none', even in the shorthand property. It might 
encourage more careful styling... but I can see intelligent arguments for a 
non-zero default offset.

> See the examples of a text outline and a 3D effect here: 
> http://www.w3.org/Style/Examples/007/text-shadow#multiple
> 
> Although it has also been suggested that those two specific effects 
> could be separated out, maybe as values on 'text-decoration'....

Ooh, shiny. But it looks like we already have 'text-outline', with a similar 
syntax (though only allowing for one outline). I'd support inset and outset as 
values on 'text-decoration'; I don't think that lengths are necessary for those 
effects.

Eli Morris-Heft
dai@doublefishstudios.com
Received on Wednesday, 7 May 2008 13:39:27 GMT

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