RESOLVED FIXED 27417
Add spread radius support to -webkit-box-shadow
https://bugs.webkit.org/show_bug.cgi?id=27417
Summary Add spread radius support to -webkit-box-shadow
mitz
Reported 2009-07-18 15:23:43 PDT
A spread radius component for box-shadow values is described in <http://www.w3.org/TR/2008/WD-css3-background-20080910/#the-box-shadow>.
Attachments
Patch (55.39 KB, patch)
2009-07-18 15:28 PDT, mitz
andersca: review+
mitz
Comment 1 2009-07-18 15:28:42 PDT
Created attachment 33030 [details] Patch Treatment of corner radii is deliberately different from Firefox’s. <http://www.w3.org/TR/2008/WD-css3-background-20080910/#the-box-shadow> says “ The shadow should not change shape when a spread radius is applied: sharp corners should remain sharp”, and this patch extrapolates this to not increasing the radius. Firefox makes a special case for the 0 radius by preserving it, while growing any positive radius by the spread radius, which does not make sense to me.
mitz
Comment 2 2009-07-18 15:32:26 PDT
Anders Carlsson
Comment 3 2009-07-18 15:53:23 PDT
Comment on attachment 33030 [details] Patch r=me!
mitz
Comment 4 2009-07-18 15:59:46 PDT
Hajime Morrita
Comment 5 2011-01-19 23:21:52 PST
Hi mitz, Trying fix Bug 49913, I find this bug describes the behavior reported 49913 is intentional. But I have an objection... According to the spec [1], "The shadow should not change shape when a spread radius is applied", that means, in my understanding, the circle-shaped border makes circle-shaped shadow. And Mozilla and Opera go that way [2]. I think scaling shadow radii based on spread is the right thing to do because it "optically" correct. What do you think? [1] http://www.w3.org/TR/2008/WD-css3-background-20080910/#box-shadow [2] http://habrahabr.ru/blogs/css/103170/
mitz
Comment 6 2011-01-19 23:33:13 PST
I think that the language in the editor’s draft has changed in a way that it is no longer possible to reconcile the WebKit implementation with it. I still think the discontinuity at 0 is bizarre. <http://dev.w3.org/cvsweb/~checkout~/csswg/css3-background/Overview.html?rev=1.237>
Hajime Morrita
Comment 7 2011-01-19 23:48:09 PST
(In reply to comment #6) > I think that the language in the editor’s draft has changed in a way that it is no longer possible to reconcile the WebKit implementation with it. I still think the discontinuity at 0 is bizarre. > > <http://dev.w3.org/cvsweb/~checkout~/csswg/css3-background/Overview.html?rev=1.237> Mitz, thanks for your rapid feedback! I didn't know such a history. Though I'm not sure whether I understand your concern about discontinuity, I'll try something at Bug 49726. (which is the canonical of Bug 49913 I mentioned at previous post.)
mitz
Comment 8 2011-01-19 23:55:09 PST
By “discontinuity” I mean that the rule applied to a border-radius value of 0 is different from that applied to any positive border-radius value. To me, this makes no sense.
Hajime Morrita
Comment 9 2011-01-20 00:14:03 PST
(In reply to comment #8) > By “discontinuity” I mean that the rule applied to a border-radius value of 0 is different from that applied to any positive border-radius value. To me, this makes no sense. I got it! We cannot increase nor decrease the radii in that case.
Note You need to log in before you can comment on or make changes to this bug.