W3C home > Mailing lists > Public > www-style@w3.org > November 2013

Re: [css3] box-shadow specification bug

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 11 Nov 2013 02:26:51 -0800
Message-ID: <5280B0EB.6090101@inkedblade.net>
To: Andrew Fedoniouk <news@terrainformatica.com>
CC: "www-style@w3.org" <www-style@w3.org>
On 04/04/2013 08:58 PM, Andrew Fedoniouk wrote:
>
> Please check this sample in Google Chrome and Firefox:
> http://terrainformatica.com/w3/box-shadow-outer.htm
>
> Note top corners in first and second div's.
>
> FF renders this according to the spec and so it demonstrates bug in the specification.
>
> In these two divs top/right border radius has these values:
> 0.001px and 0.1px
>
> The rendering is dependent to particular UA rounding rules.
> So R=0.001px is considered as zero radius in FF
> and 0.1px is not.
>
> So together with the requirement "For corners with a zero border-radius,
> however, the corner must remain sharp" the spec also shall have a notion
> of zero border-radius and/or calculation precision and how exactly
> to measure sharpness.
>
> Chrome renders this against the spec but mathematically correct,
> distance there is distance - all points with similar color lie on the same
> distance from the border, no matter what radius is used
> and so this implementation is stable to rounding problems, floating
> point precision, etc.
>
> Please consider removing  "For corners with a zero border-radius,
> however, the corner must remain sharp" statement from the spec.

I don't think we can have the initial behavior of spread shadows to
create rounded corners given they've been sharp for all these years.
So I see two options here:
   a) leave the spec as-is, it means there will be some rounding issues
      as you note
   b) make the initial value of border-radius 'none' rather than zero,
      with 'none' invoking sharp corners and zero giving round corners

b) has some significant compatibility risks, but I can raise it to the
WG to see if anyone has thoughts on the matter.

~fantasai
Received on Monday, 11 November 2013 10:27:22 UTC

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