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

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

From: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 28 Apr 2010 20:44:49 -0700
Cc: Alex Meiburg <timeroot.alex@gmail.com>, www-style@w3.org
Message-Id: <98371113-4C92-4481-92DC-119A01637974@gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
On Apr 28, 2010, at 5:13 PM, Tab Atkins Jr. wrote:

> No, I'd rather do a single correct and consistent thing.  My problem
> right now is that the specced behavior doesn't seem consistent.
> border-radius:0 and border-radius:.01px create completely different
> shadows when you use spread.  I think we should commit to doing either
> pure scaling or pure spreading, not the current "if border-radius is
> 0, scale, else spread".

For what its worth:

 Adobe Illustrator (a vector drawing program) works that way too. You can set a stroke to have sharp angled transitions, but if the path the stroke follows has a tiny rounded join instead of a corner join, then the stroke path will follow that curve and make it very obvious when the stroke is wide. I image SVG would do the same, but I'm not familiar with it.

 I've only seen shadow spread applied as raster drawing, which means no sharp corners, even on rectangles. I've never missed them, because usually I am combining the spread with a blur, and you just don't notice any problem with that. Since CSS can treat rectangles like vector paths, we can have these sharp corner joins. But if we didn't, my heart would not be broken (and it would not be something that could be extended to images or canvas anyway).

 If we do have sharp corners, then authors WILL use shadows to create multiple borders (or at least, shadows that look like borders), by layering sharp edged shadows of different colors and as both inner and outer shadows. How do we feel about that? Give them the power? Or prevent this subversion of the purpose of shadows?

Received on Thursday, 29 April 2010 03:45:24 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:26 GMT