Re: [csswg-drafts] [css-backgrounds-3][css-borders-4] The shape of box-shadow should be a circle for a box with border-radius:50% and big spread (#7103)

The table was big enough and busy enough that it took me a bit to find the different cases - it turns out that only the 3rd and 4th rows are noticeably different between current spec and your proposal. (For anyone else: dropping in some Inspector rules on `td:nth-child(3-n), td:nth-child(10){display:table-cell !important;} td { display: none; }` isolates to only the relevant cases for this.)

These two cases are indeed showing off the exact place where the current spec doesn't do great, where the radius is a large fraction (50%, in fact) of the side length, but is relatively small compared to the *spread* length. The current spec causes row 3 (tiny circle) to have a nearly sharp shadow due to both radiuses shrinking, and row 4 (wide flat ellipse) to shrink the vertical radius so the shadow is no longer elliptical. In your alternate, both of these get caught by "radius is a large % of the side length" and interpolate heavily toward the naive corner-growth formula of the "old" spec, so the shadow edges stay round and elliptical, respectively.

I think this is an improvement! While the size of the radius relative to the shadow spread is an important quality for determining whether the corner is "sharp" or "round", the size of the radius relative to the border *length* is also relevant for determining whether the shape as a whole is "squarish" or "roundish", and I think this does a good job with balancing the two.

The rest of the cases all look identical to my eyes between current spec and your adjustment; I'm sure there's small pixel shifts, but they're not meaningful to the result. This suggests that your adjustment is well-targeted, too.

So, +1 from me.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7103#issuecomment-3293804192 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 15 September 2025 20:23:42 UTC