Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-borders-4] Consider continuous as a corner-shape #11622

Open
noamr opened this issue Jan 30, 2025 · 4 comments
Open

[css-borders-4] Consider continuous as a corner-shape #11622

noamr opened this issue Jan 30, 2025 · 4 comments

Comments

@noamr
Copy link
Collaborator

noamr commented Jan 30, 2025

We've closed #10993 with the resolution to go with superellipses rather than with continuous rounded corners ("apple style").
Opening this issue to keep the option open to add this corner shape in the future, as it provides a style that differs from squircles.
See aforementioned issue for more context.

@tabatkins
Copy link
Member

So 'continuous' is some sort of "round, but with c2 continuity", right? Because round (and squircle/etc) abruptly changes from 0 to non-zero curvature when you enter the border-radius zone. (Maybe it's "squircle with c2 continuity"?)

What's the actual math behind this? @smfr?

@smfr
Copy link
Contributor

smfr commented Jan 30, 2025

continuous actually eats into the "flat" part of the edge to achieve a smooth curvature change. You can see this at https://noamr.github.io/squircle-testbed/ (see the source for the bezier construction).

@PeterNjeim
Copy link

Forgive me if I'm wrong, but I've been experimenting with that website and it seems like I can recreate any border-radius of the continuous version by multiplying the border-radius by 1.16 and setting the K value to -1 of the superellipse, making it redundant.

Images

Image
Image
Image
Image
Image
Image
Image
Image

@smfr
Copy link
Contributor

smfr commented Jan 31, 2025

They are pretty close but not exact (easier to see in light mode).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants