Re: [csswg-drafts] [css-borders-4] Use cases for `corner-shape` (#6980)

> [@noamr](https://github.com/noamr) I'm using your demo website (https://noamr.github.io/squircle-testbed) and trying to achieve the shape I want. I set the border-radius to `50` and used the formula `ln(n)/ln(2)=K` and indeed it works for cutting the corner. However, I don't want to cut the corner, I want to round it out. For example, if I want to make a circle with the superellipse option, with border-radius `50` I need to set `K` to around `-0.83`, but I'm not sure what formula I need to use to get this number. With some math I got `ln(0.56)/ln(2)≈-0.83`, but I don't know how to obtain the `0.56` without knowing the negative `K` value in the first place. I want to set the exponent to `5` (which is what Apple uses), but I don't know the corresponding negative `K` value to make it work. Any ideas?

I think the `k` in the demo needs to be fixed. 
With a 50% border-radius:
- In the current spec options, a circle would be `k=1` or `k=2`, or the keyword `round` (which is the default)
- A squircle would be `k=2` or `k=4`.
- A "5" exponent would be something like 2.3 or `k=5`.

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


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

Received on Friday, 31 January 2025 09:58:49 UTC