W3C home > Mailing lists > Public > www-style@w3.org > June 2010

Re: [css3-background] box-shadow spread Multiple Choice Question

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 8 Jun 2010 15:17:15 -0700
Message-Id: <08C944EB-A4C3-4045-BCE9-EEAAE1E3617E@gmail.com>
To: Brian Manthos <brianman@microsoft.com>
Cc: Brendan Kenny <bckenny@gmail.com>, Sylvain Galineau <sylvaing@microsoft.com>, fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>

On Jun 8, 2010, at 12:55 PM, Brian Manthos <brianman@microsoft.com>  

> Brad Kemper:
>>> Brad Kemper:
>>>> And as I've said in the past, spread is not something created in
>>>> order to simulate some phenomenon observed in nature. It is  
>>>> intended
>>>> to give greater control of the placement and extent of the shadow  
>>>> at
>>>> a level consistent with what is commonly available when creating
>>>> shadows in familiar ways using tools such Photoshop.
>>> Is this the only place in CSS3 that gives authors a way to apply  
>>> such an
>> shape-derivation effect?
>> No. The shape of the inside of a border is different from the shape  
>> of the
>> outside of the border, in the same sort of way. 'Outline-offset'  
>> should do the
>> same sort of offsetting to border-radius (but in practice doesn't  
>> seem to pay
>> attention to border-radius at all yet).
> Ah, so if shadow became just a scaling then the (Photoshop-esque)  
> spread effect could still be achieved with multi-element border  
> shenanigans (which is still better than bitmaps, IMO)?

You mean, use a transparent border, or add a wrapper element with  
padding and shadow that instead? Yeah, a hack like that would work  
too, as a roundabout way to get a true spread effect (what you call  

But why? There is no visual advantage to simulating the spead via  
scaling. The end result does not look like a scaled shadow unless the  
element is perfectly square, because the UA would scale differently  
for the horizontal than the vertical in order to bring the edges out  
to where they would be if it was an outset. It ends up looking like  
just almost-spread, with distorted curves and heavy spots in the  
corners. They question should really be if this is good enough if the  
UA were to do that as a speed optimization, and not about this being  
the best solution. I just feel it is absurd to say that the most  
distorted version of fake-outset is better looking than the actual  
Received on Tuesday, 8 June 2010 22:18:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:47 UTC