Re: [css3-background] box-shadow syntax

On Aug 19, 2008, at 8:26 AM, fantasai wrote:

>>> 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.
>> We've discussed that before here. From a logical perspective, based  
>> on experience with real objects in the physical universe, an object  
>> can't really be hovering above a surface if it is in fact a hole  
>> cut in that surface. The only reason to have both at the same time  
>> is to create an effect that is not really a drop shadow, such as a  
>> highlight.
> Right. I expect we'll see it used to that effect.

Yeah, but IMO the spec should not be designed around such misuse. Or  
if it is, it should not be called "box-shadow". A highlight is not a  
shadow. It is counterintuitive that something called "box shadow"  
should be crafted specifically as something to create highlights. An  
inner shadow is still a type of drop shadow, just as an outer shadow  
is, but a highlight is not.

>>> The syntax I've drafted
>>> allows you to have both at the same time, but you have to set them
>>> together.
>> What does that look like in this syntax? Or do you mean you would  
>> add another keyword to add as well for "outer"?
> In the current syntax you can have both like this:
>  box-shadow: 3px 3px, inset 3px 3px;
> because the keyword is associated with each shadow, not with the  
> entire
> property.

OK, I see, then you are using multiple shadows. But then I don't  
understand the part about "maybe they should be separate properties so  
they can be set independently". If you are using multiple shadows,  
wouldn't they be able to be set independently regardless of whether  
"inset" (or "inner") is a value of a separate sub-property than "outer"?

Received on Tuesday, 19 August 2008 15:46:22 UTC