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

The CSS Working Group just discussed `box-shadow shape`.

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: box-shadow shape<br>
&lt;TabAtkins> github: https://github.com/w3c/csswg-drafts/issues/7103<br>
&lt;TabAtkins> dbaron: a few weeks ago oriol prepare a bunch of demos for this problem<br>
&lt;TabAtkins> dbaron: underlying issue is that in 2013 we changed the spec so expansion of rounded borders, which happens primarily for box-shadow spread, was not discontinuous<br>
&lt;TabAtkins> dbaron: prior it was discontinuous from 0 to non-zero border-radius<br>
&lt;TabAtkins> dbaron: we introduced this cubic formula<br>
&lt;TabAtkins> dbaron: So normally a 5px border-radius and 3px of spread means an 8px spread corner<br>
&lt;TabAtkins> dbaron: so they're concentric<br>
&lt;TabAtkins> dbaron: nobody shipped it until earlier this year<br>
&lt;TabAtkins> dbaron: Chromium got bug reports now about circles expanded to non-circles<br>
&lt;TabAtkins> dbaron: So we want circles to stay circles<br>
&lt;TabAtkins> dbaron: Oriol had proposals, group was unhappy with all of them<br>
&lt;TabAtkins> dbaron: since then i cam eup with two additional proposals, fantasai had a third i attempted to put into oriol's demo<br>
&lt;TabAtkins> dbaron: so we can look at these additional options<br>
&lt;TabAtkins> dbaron: so first option is the existing formula<br>
&lt;TabAtkins> astearns: skip to demos, we can go back to math<br>
&lt;fantasai> -> https://lists.w3.org/Archives/Public/www-archive/2022Sep/att-0012/shadow-radius.html<br>
&lt;TabAtkins> dbaron: this third example is a circle, that's important, and there are some other pretty round cases<br>
&lt;TabAtkins> dbaron: this is the spec currently, you'll see the circle is no longer circle at all, other round examples have flattened ends<br>
&lt;TabAtkins> dbaron: my first option is based on the ratio fo the rounded part of an edge to the total length of the edge, using tat as a cap on the cubic formula<br>
&lt;TabAtkins> dbaron: one puts the cap on before, one after the cubing, so one is linear and the other is cubic<br>
&lt;TabAtkins> fantasai: in the very last, thre's a sharp corner, but it gets quite rounded in both of yours<br>
&lt;TabAtkins> fantasai: but your other squares arent' particularly rounded<br>
&lt;TabAtkins> dbaron: elika's is capping based on --- using oriol's "% of max axis" but not all the time, switches beetween it and current spec<br>
&lt;TabAtkins> fantasai: EAch side has a straight and a curved piece. if it's all curve, it uses % formula, if it's at least the length of the box side it uses the spec formula, and between those it interpolates<br>
&lt;astearns> q?<br>
&lt;TabAtkins> dbaron: the other things that's different is i did the capping based on the ratio of rounded vs total side length, elika did ratio of rounded to straight part of the side<br>
&lt;TabAtkins> dbaron: not sure which is better<br>
&lt;TabAtkins> dbaron: but werid thing about elika's is it requires a max because it hits the cap in the middle rather than the end<br>
&lt;TabAtkins> astearns: the old spec is super round for the square with 1px round corner<br>
&lt;TabAtkins> fantasai: yeah tha's why we change the spec<br>
&lt;TabAtkins> astearns: wonder if we'll get people wanting that, tho<br>
&lt;TabAtkins> fantasai: depends on what you're trying to do<br>
&lt;TabAtkins> fantasai: goal was to get something continuous<br>
&lt;TabAtkins> fantasai: for squarish things i think current spec is better, but for circlish it's broken<br>
&lt;TabAtkins> astearns: sounds like we need some more options in the dmo?<br>
</details>


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


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

Received on Saturday, 17 September 2022 00:44:33 UTC