Re: [csswg-drafts] [css-borders-4] Consider constraining radii for concave corner-shape when opposite corners overlap (#12098)

> Agree that constraining the radii makes more sense than changing the shape. But how exactly does the constraining work? Does the superellipse value affect the amount of constraining? If one corner is `notch`, and the opposite corner is `scoop`, are they constrained equally? Do we constrain just enough such that the inner edge of the border touches (i.e. you never end up with two disjoint shapes as seen above)?

A model we can follow is something as such:
- We compute the hull for both corners
- If the hulls don't intersect, do nothing
- Find how many pixels the diagonal of each corner would have to shrink by independently in order for the hulls to touch but not intersect 
- Find the ratio between diagonals
- Use the above to shrink the corners so that the ratio between the diagonals remains the same as before, but the hulls touch and don't intersect.

* exact math TBD, but with hulls it's not too complex/costly.




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


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

Received on Thursday, 8 May 2025 09:23:17 UTC