<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>41425</bug_id>
          
          <creation_ts>2010-06-30 13:17:46 -0700</creation_ts>
          <short_desc>Negative shadow radius should make shadow properties invalid</short_desc>
          <delta_ts>2023-01-25 16:40:09 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Simon Fraser (smfr)">simon.fraser</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bdakin</cc>
    
    <cc>karlcow</cc>
    
    <cc>mitz</cc>
    
    <cc>ntim</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>244911</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-06-30 13:17:46 -0700</bug_when>
    <thetext>We should throw out box-shadow and text-shadow properties when the blur radius is negative; the rule should be considered invalid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886209</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-23 07:24:42 -0700</bug_when>
    <thetext>https://wpt.fyi/results/css/css-backgrounds/box-shadow-radius-001.html?label=master&amp;label=experimental&amp;aligned&amp;q=shadow-radius

It has box-shadow negative values coverage. Ignore my comment, if I am wrong. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1928327</commentid>
    <comment_count>2</comment_count>
      <attachid>464659</attachid>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-01-25 16:39:49 -0800</bug_when>
    <thetext>Created attachment 464659
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 &lt;length [0,∞]&gt;
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&apos;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&apos;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.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>464659</attachid>
            <date>2023-01-25 16:39:49 -0800</date>
            <delta_ts>2023-01-25 16:39:49 -0800</delta_ts>
            <desc>test for negative values in box|text-shadow</desc>
            <filename>test-box-text-shadow-negative.html</filename>
            <type>text/html</type>
            <size>871</size>
            <attacher name="Karl Dubost">karlcow</attacher>
            
              <data encoding="base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