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

Re: [css3-background] box-shadow syntax

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 19 Aug 2008 15:25:41 +0100
Message-ID: <48AAD7E5.4050504@inkedblade.net>
To: Brad Kemper <brkemper.comcast@gmail.com>, www-style@w3.org

fantasai wrote:
> http://dev.w3.org/csswg/css3-background/#the-box-shadow
>  # The ‘inset’ keyword, if present, changes the drop shadow from an outer
>  # shadow (one that shadows the box onto the canvas, as if it were lifted
>  # above the canvas) to an inner shadow (one that shadows the canvas onto
>  # the box, as if the box were cut out of the canvas and its contents drawn
>  # on a surface behind). 
>
> Brad Kemper wrote:
>> That's pretty good. I have some thoughts on clarifying the spread part 
>> too, but I will confine myself to the inner shadow for now.
>> I would prefer two values ("inner" and "outer") instead of one 
>> ("inset"), so that it is easier to switch back and forth. It might be 
>> something an author might want to turn on or off via JavaScript, or 
>> via ":hover" (or in case there was a general rule to inherit the inner 
>> shadow value, and a more specific one to make it outer shadow). It 
>> seems like that would be much easier if the value could be explicitly 
>> set to outer. It could still be an optional value, defaulting to "outer".

Would swapping keywords really be easier than adding/removing a keyword?

Also I'm wondering if people want to do combinations of inner and outer
shadows, maybe they should be separate properties so they can be set
independently? E.g. you might want to add an outer drop-shadow on :hover
without affecting any already-set inner shadows. The syntax I've drafted
allows you to have both at the same time, but you have to set them
together.

~fantasai
Received on Tuesday, 19 August 2008 14:26:19 GMT

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