Re: [csswg-drafts] [css-backgrounds] Add support for squircle and superellipse to corner-shape (#6296)

I think adding keyword `superellipsis` to property `corner-shape` would make a lot of sense. The visual difference between the default `round` and `superellipsis` would be small enough that there would be nice gradual take-off unlike with more complex corner shapes. In addition, having explicit support for superellipsis would allow keeping the author CSS simpler and browser engines could have special high-performance code path for the superellipsis.

I would expect that most authors would use `corner-shape: superellipsis` for most rectangular elements with rounded corners and `corner-shape: round` for elements that need to match with actual circles. I think the `superellipsis` should automatically use aspect ratio where the difference over the whole curve is minimal compared to `round`. Another option would be to make `superellipsis(ratio)` function but in that case, the suggestion about `cubic-bezier()` is already close enough in complexity.

The use cases for more complex corner shapes are rare enough so there isn't need for such clean solutions there and the authors can be expected to use more verbose syntax such as SVG paths for every corner.

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


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

Received on Tuesday, 22 November 2022 14:21:32 UTC