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

[css3-background] box-shadow definition should define what a zero border radius means

From: L. David Baron <dbaron@dbaron.org>
Date: Thu, 26 Apr 2012 17:04:54 -0700
To: www-style@w3.org
Message-ID: <20120427000454.GA31115@crum.dbaron.org>
http://dev.w3.org/csswg/css3-background/#the-box-shadow says:
  # For corners with a zero border-radius, however, the corner must
  # remain sharpโ€”the operation is equivalent to scaling the shadow
  # shape.

It doesn't define "with a zero border-radius" precisely.  In
particular, each corner has two border radii; one for the x axis and
one for the y axis.  Does "with a zero border-radius" mean "with
either value zero" or does it mean "with both values zero"?

I think it should mean "with either value zero", since if either
border-radius is zero, the corner is sharp.  However, I think this
should be explicit.

Speaking in terms of examples, the question is whether paragraph one
in the following should look like paragraph two or (as I think it
should) paragraph three:

<!DOCTYPE html>
p { background: blue; color: white }
#one { margin: 5px; box-shadow: 0 0 0 5px blue; border-radius: 5px / 0px }
#two { padding: 5px; border-radius: 10px / 5px }
#three { padding: 5px }
<p id="one">One</p>
<p id="two">Two</p>
<p id="three">Three</p>

(Note that if I instead had #one { border-radius: 5px / 1px }, it
should definitely look like #two, except with an extra 1 pixel of
radius to account for the change from 0px to 1px.)


๐„ž   L. David Baron                         http://dbaron.org/   ๐„‚
๐„ข   Mozilla                           http://www.mozilla.org/   ๐„‚
Received on Friday, 27 April 2012 00:05:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:15 UTC