Re: [css3-background] box-shadow spread radius and rounded corners

This deviates slightly, but what if the box uses a border image with
transparency? Should the shadow be "hard", that is, assume that the entire
border image is opaque, or would it make sense to do something like
AppliedShadow.Alpha=SpecifiedShadow.Alpha*BorderImage.Pixel.Alpha? So an
opaque area casting a shadow with the specified transparency, a transparent
part of the image not casting any shadow, and a translucent area casting
some shadow (but not as dark). For people authors who go through the effort
of making the fancy border images with interesting shapes and grooves, this
might well be worth it.

~6 out of 5 statisticians say that the number of statistics that either make
no sense or use ridiculous timescales at all has dropped over 164% in the
last 5.62474396842 years.

On Tue, Apr 27, 2010 at 5:31 PM, Sylvain Galineau <sylvaing@microsoft.com>wrote:

> Note: the WG has resolved to add box-shadow back to CSS3 Background &
> Borders [1] but as the
> editor's draft has not yet been updated, the following refers to the last
> document version for which
> it was defined [2].
>
> According to the spec:
>
> # The fourth length is a spread radius. Positive values cause the shadow to
> grow in all directions by the
> # specified radius. Negative values cause the shadow to shrink. The shadow
> should not change shape
> # when a spread radius is applied: sharp corners should remain sharp.
>
> The requirement to not change the shape of the shadow seems very desirable
> from an author standpoint
> e.g. the large spread shadow of an oval-shaped box should be oval as well.
>
> This in turn implies scaling border-radii. One could. for instance, adjust
> the border-radii of the spread
> shadow by multiplying  them by  (1+((2 *spread-radius)/max(width, height)).
>  Alternatively, one
> could attempt to obtain better fidelity by adjusting horizontal and
> vertical border radii independently.
>
> Given that preserving the overall shape is desirable and that the number of
> alternatives to achieve it should
> be fairly small, is this something implementors are interested in defining
> interoperably as part of this edit ?
>
> [1] http://lists.w3.org/Archives/Public/www-style/2010Apr/0273.html
> [2] http://www.w3.org/TR/2008/WD-css3-background-20080910/#the-box-shadow
>
>
>

Received on Wednesday, 28 April 2010 01:26:43 UTC