Re: [css3-background] box-shadow syntax

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

Eli Morris-Heft

Received on Wednesday, 7 May 2008 13:39:27 UTC