WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
41425
Negative shadow radius should make shadow properties invalid
https://bugs.webkit.org/show_bug.cgi?id=41425
Summary
Negative shadow radius should make shadow properties invalid
Simon Fraser (smfr)
Reported
2010-06-30 13:17:46 PDT
We should throw out box-shadow and text-shadow properties when the blur radius is negative; the rule should be considered invalid.
Attachments
test for negative values in box|text-shadow
(871 bytes, text/html)
2023-01-25 16:39 PST
,
Karl Dubost
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Ahmad Saleem
Comment 1
2022-07-23 07:24:42 PDT
https://wpt.fyi/results/css/css-backgrounds/box-shadow-radius-001.html?label=master&label=experimental&aligned&q=shadow-radius
It has box-shadow negative values coverage. Ignore my comment, if I am wrong. Thanks!
Karl Dubost
Comment 2
2023-01-25 16:39:49 PST
Created
attachment 464659
[details]
test for negative values in box|text-shadow The negative values in these tests are the spread-radius (4th value), not the border radius. Negative values are authorized on the 4th value.
https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow
box-shadow: offset-x | offset-y | blur-radius | spread-radius | color 3rd <length [0,∞]> Specifies the blur radius. Negative values are invalid. If the blur value is zero, the shadow’s edge is sharp. Otherwise, the larger the value, the more the shadow’s edge is blurred. See Shadow Blurring, below. —
https://w3c.github.io/csswg-drafts/css-backgrounds/#box-shadow
https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow
text-shadow: offset-x | offset-y | blur-radius | color OR text-shadow: color | offset-x | offset-y | blur-radius
https://w3c.github.io/csswg-drafts/css-text-decor/#text-shadow-property
doesn't really forbid the negative value apart a reference to the length where it says it can be problematic. The story is slightly different in text-shadow 4
https://drafts.csswg.org/css-text-decor-4/#text-shadow-property
where it explicitly reference the box-shadow way of doing things.
https://drafts.csswg.org/css-backgrounds-3/#typedef-shadow
I uploaded a test. There's no styling going on when the values are negative. So probably this has been solved in the past. And we can also see this in the Web Inspector.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug