-
Notifications
You must be signed in to change notification settings - Fork 689
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] Resolve on range for superellipse
parameters
#11609
Comments
|
Actually, that makes me wonder if we need more detail on how the superellipse is computed, given a corner size (in pixels). It would be weird for a corner to appear sharp on a small box, but still slightly rounded on a large box because of how the math works out. We need math that is size-independent. |
This is addressed in the draft |
You mean when we describe it as bezier curves? For the cartesian equation this shouldn't matter. |
I strongly prefer the log2-scaled version of the superellipse parameter, so the symmetric inny and outy shapes use the same parameters, just negated; in general, it makes the "stuff poking out more than angle" and "stuff poking in more than angle" have the same value range and same value meaning, which is a lot easier to understand and use imo. It also happens to make the most significant values even simpler - 0, 1, 2, inf.
You get a (mathematically) sharp corner at infinity and -infinity (or infinity and 0, in the current spec). And that's stable regardless of box size. Any value short of those endpoints will produce a curve with some extremely high curvature, so at a sufficiently large border-radius it will indeed appear curved rather than sharp. |
Thanks! I tend to agree. |
@smfr with my proposed formula for interpolation applied on these values it would look like this:
The formula is intersecting the diagonal with the superellipse function, which resolves to this (given
|
An advantage for using the current spec'ed version (without |
Follow up on #10993
The initial draft for
corner-shape
andsuperellipse
uses the following parameters:We can also use the
log2
version of this:notch -> -inf
scoop -> -1
bevel -> 0
round -> 1
squircle -> 2
straight -> inf
This would have an effect on the formula in #11608 as well.
The text was updated successfully, but these errors were encountered: