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

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

From: Brian Manthos <brianman@microsoft.com>
Date: Fri, 27 Apr 2012 01:16:21 +0000
To: "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <4031779A10373C4AB7B9FBAD218A8BAC0BCF15@CH1PRD0310MB391.namprd03.prod.outlook.com>
# 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.


-----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>
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.)


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

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

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