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

5.1
# If either length is zero, the corner is square, not rounded

There's a mismatch between "sharp" and "square" but it's at least explicit here.

-Brian


-----Original Message-----
From: L. David Baron [mailto:dbaron@dbaron.org] 
Sent: Thursday, April 26, 2012 5:05 PM
To: www-style@w3.org
Subject: [css3-background] box-shadow definition should define what a zero border radius means

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>
<style>
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 } </style> <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.)

-David

-- 
๐„ž   L. David Baron                         http://dbaron.org/   ๐„‚
๐„ข   Mozilla                           http://www.mozilla.org/   ๐„‚

Received on Friday, 27 April 2012 01:17:03 UTC