Re: [css3-background] Box-shadow spread with border-radius

On Tuesday 01 April 2014 01:28:44 fantasai wrote:
> On 03/24/2014 09:36 AM, Matt Rakow wrote:
> > Hi all,
> > 
> > There seem to be a couple issues with the wording of the new box-shadow
> > spread behavior with border-radius:
> > 
> > 1. "when the ratio r of a border radius to the spread distance
> > 
> >    is less than one" -- this should be the magnitude of the ratio,
> >    to account for negative spread distances.
> 
> Hm. Actually, I don't think this should apply to negative spread
> distances. Or if it does, it needs to be a different formula: if
> the spread distance is negative and equal in magnitude to the
> border radius, it is going to result in a sharp corner regardless.
> 
>    1+(1-1)^3 = 1 ratio adjustment
> 
>    20px + -20px*1 = 0 effective spread radius
> 
> I've made the adjustment for positive spreads only, for now.
> (Equivalent to no change from the previous CR.) Let me know
> if you think something else would be better.

I've done an "implementation" of the corrected paragraph from the editors' 
draft and tested various values of border radius and spread (big, small, 
positive, negative) and it appears to be correct.

While writing the two conditions for negative spread and small ratio, I 
noticed, however, that it's actually just one condition: one can replace the 
two phrases

    when the ratio r of a border radius to the spread distance is less than
    one
and
    does not apply to negative spread distances
by
    when the border radius is less than the spread distance

because the border radius is always greater than or equal to 0.



But 

-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Friday, 11 April 2014 18:37:00 UTC