Skip to content

[css-borders-4] Apply corner-shape syntax resolutions #12033

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

noamr
Copy link
Collaborator

@noamr noamr commented Apr 1, 2025

  • Use square instead of straight
  • Use the log2 version for the superellipse() parameter
  • Interpolate symetrically from the middle.

Closes #11607
Closes #11608
Closes #11609

- Use `square` instead of `straight`
- Use the log2 version for the `superellipse()` parameter
- Interpolate symetrically from the middle.

Closes w3c#11607
Closes w3c#11608
Closes w3c#11609
@noamr noamr requested review from smfr and tabatkins April 1, 2025 17:40
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 3, 2025
Interpolate superellipse values as per CSSWG resolution:
w3c/csswg-drafts#11608 (comment)

The values are converted to a linear range by converting
the superellipse to its half corner's X, which interpolates
on a diagonal line across the corner.

The simplified formula
(see w3c/csswg-drafts#12033) is
0.5^(0.5^(param)), and adjusted to be symmetrical for
convex/concave.

Implemented all of this in CSSSuperellipseInterpolationType,
and added an appropriate corner-shape-interpolation test.

R=fs@opera.com
CC=​pdr@chromium.org

Bug: 3940596
Change-Id: I552ace6cce40b5e41afd300df1ddcb4d2082c7a2
Fixed: 3940596
aarongable pushed a commit to chromium/chromium that referenced this pull request Apr 3, 2025
Interpolate superellipse values as per CSSWG resolution:
w3c/csswg-drafts#11608 (comment)

The values are converted to a linear range by converting
the superellipse to its half corner's X, which interpolates
on a diagonal line across the corner.

The simplified formula
(see w3c/csswg-drafts#12033) is
0.5^(0.5^(param)), and adjusted to be symmetrical for
convex/concave.

Implemented all of this in CSSSuperellipseInterpolationType,
and added an appropriate corner-shape-interpolation test.

R=fs@opera.com
CC=​pdr@chromium.org

Bug: 394059605
Change-Id: I552ace6cce40b5e41afd300df1ddcb4d2082c7a2
Fixed: 394059605
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6425902
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/main@{#1442117}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 3, 2025
Interpolate superellipse values as per CSSWG resolution:
w3c/csswg-drafts#11608 (comment)

The values are converted to a linear range by converting
the superellipse to its half corner's X, which interpolates
on a diagonal line across the corner.

The simplified formula
(see w3c/csswg-drafts#12033) is
0.5^(0.5^(param)), and adjusted to be symmetrical for
convex/concave.

Implemented all of this in CSSSuperellipseInterpolationType,
and added an appropriate corner-shape-interpolation test.

R=fs@opera.com
CC=​pdr@chromium.org

Bug: 3940596
Change-Id: I552ace6cce40b5e41afd300df1ddcb4d2082c7a2
Fixed: 3940596
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6425902
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/main@{#1442117}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 3, 2025
Interpolate superellipse values as per CSSWG resolution:
w3c/csswg-drafts#11608 (comment)

The values are converted to a linear range by converting
the superellipse to its half corner's X, which interpolates
on a diagonal line across the corner.

The simplified formula
(see w3c/csswg-drafts#12033) is
0.5^(0.5^(param)), and adjusted to be symmetrical for
convex/concave.

Implemented all of this in CSSSuperellipseInterpolationType,
and added an appropriate corner-shape-interpolation test.

R=fs@opera.com
CC=​pdr@chromium.org

Bug: 3940596
Change-Id: I552ace6cce40b5e41afd300df1ddcb4d2082c7a2
Fixed: 3940596
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6425902
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/main@{#1442117}
@noamr
Copy link
Collaborator Author

noamr commented Apr 7, 2025

@smfr review again?

ChunMinChang pushed a commit to ChunMinChang/gecko-dev that referenced this pull request Apr 7, 2025
Automatic update from web-platform-tests
Corner-shape: interpolation

Interpolate superellipse values as per CSSWG resolution:
w3c/csswg-drafts#11608 (comment)

The values are converted to a linear range by converting
the superellipse to its half corner's X, which interpolates
on a diagonal line across the corner.

The simplified formula
(see w3c/csswg-drafts#12033) is
0.5^(0.5^(param)), and adjusted to be symmetrical for
convex/concave.

Implemented all of this in CSSSuperellipseInterpolationType,
and added an appropriate corner-shape-interpolation test.

R=fs@opera.com
CC=​pdr@chromium.org

Bug: 394059605
Change-Id: I552ace6cce40b5e41afd300df1ddcb4d2082c7a2
Fixed: 394059605
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6425902
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/main@{#1442117}

--

wpt-commits: 90fcc6fd8576c63aa20e9e63ebc840ad61d27b48
wpt-pr: 51829
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Apr 8, 2025
Automatic update from web-platform-tests
Corner-shape: interpolation

Interpolate superellipse values as per CSSWG resolution:
w3c/csswg-drafts#11608 (comment)

The values are converted to a linear range by converting
the superellipse to its half corner's X, which interpolates
on a diagonal line across the corner.

The simplified formula
(see w3c/csswg-drafts#12033) is
0.5^(0.5^(param)), and adjusted to be symmetrical for
convex/concave.

Implemented all of this in CSSSuperellipseInterpolationType,
and added an appropriate corner-shape-interpolation test.

R=fs@opera.com
CC=​pdr@chromium.org

Bug: 394059605
Change-Id: I552ace6cce40b5e41afd300df1ddcb4d2082c7a2
Fixed: 394059605
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6425902
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/main@{#1442117}

--

wpt-commits: 90fcc6fd8576c63aa20e9e63ebc840ad61d27b48
wpt-pr: 51829
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Apr 8, 2025
Automatic update from web-platform-tests
Corner-shape: interpolation

Interpolate superellipse values as per CSSWG resolution:
w3c/csswg-drafts#11608 (comment)

The values are converted to a linear range by converting
the superellipse to its half corner's X, which interpolates
on a diagonal line across the corner.

The simplified formula
(see w3c/csswg-drafts#12033) is
0.5^(0.5^(param)), and adjusted to be symmetrical for
convex/concave.

Implemented all of this in CSSSuperellipseInterpolationType,
and added an appropriate corner-shape-interpolation test.

R=fsopera.com
CC=​pdrchromium.org

Bug: 394059605
Change-Id: I552ace6cce40b5e41afd300df1ddcb4d2082c7a2
Fixed: 394059605
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6425902
Commit-Queue: Noam Rosenthal <nrosenthalchromium.org>
Reviewed-by: Fredrik Söderquist <fsopera.com>
Cr-Commit-Position: refs/heads/main{#1442117}

--

wpt-commits: 90fcc6fd8576c63aa20e9e63ebc840ad61d27b48
wpt-pr: 51829

UltraBlame original commit: 87d46cad4a23d8628bdf2e9ae278a8f657553c62
globau pushed a commit to globau/firefox-test that referenced this pull request Apr 8, 2025
Automatic update from web-platform-tests
Corner-shape: interpolation

Interpolate superellipse values as per CSSWG resolution:
w3c/csswg-drafts#11608 (comment)

The values are converted to a linear range by converting
the superellipse to its half corner's X, which interpolates
on a diagonal line across the corner.

The simplified formula
(see w3c/csswg-drafts#12033) is
0.5^(0.5^(param)), and adjusted to be symmetrical for
convex/concave.

Implemented all of this in CSSSuperellipseInterpolationType,
and added an appropriate corner-shape-interpolation test.

R=fs@opera.com
CC=​pdr@chromium.org

Bug: 394059605
Change-Id: I552ace6cce40b5e41afd300df1ddcb4d2082c7a2
Fixed: 394059605
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6425902
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/main@{#1442117}

--

wpt-commits: 90fcc6fd8576c63aa20e9e63ebc840ad61d27b48
wpt-pr: 51829
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Apr 8, 2025
Automatic update from web-platform-tests
Corner-shape: interpolation

Interpolate superellipse values as per CSSWG resolution:
w3c/csswg-drafts#11608 (comment)

The values are converted to a linear range by converting
the superellipse to its half corner's X, which interpolates
on a diagonal line across the corner.

The simplified formula
(see w3c/csswg-drafts#12033) is
0.5^(0.5^(param)), and adjusted to be symmetrical for
convex/concave.

Implemented all of this in CSSSuperellipseInterpolationType,
and added an appropriate corner-shape-interpolation test.

R=fsopera.com
CC=​pdrchromium.org

Bug: 394059605
Change-Id: I552ace6cce40b5e41afd300df1ddcb4d2082c7a2
Fixed: 394059605
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6425902
Commit-Queue: Noam Rosenthal <nrosenthalchromium.org>
Reviewed-by: Fredrik Söderquist <fsopera.com>
Cr-Commit-Position: refs/heads/main{#1442117}

--

wpt-commits: 90fcc6fd8576c63aa20e9e63ebc840ad61d27b48
wpt-pr: 51829

UltraBlame original commit: 87d46cad4a23d8628bdf2e9ae278a8f657553c62
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Apr 8, 2025
Automatic update from web-platform-tests
Corner-shape: interpolation

Interpolate superellipse values as per CSSWG resolution:
w3c/csswg-drafts#11608 (comment)

The values are converted to a linear range by converting
the superellipse to its half corner's X, which interpolates
on a diagonal line across the corner.

The simplified formula
(see w3c/csswg-drafts#12033) is
0.5^(0.5^(param)), and adjusted to be symmetrical for
convex/concave.

Implemented all of this in CSSSuperellipseInterpolationType,
and added an appropriate corner-shape-interpolation test.

R=fsopera.com
CC=​pdrchromium.org

Bug: 394059605
Change-Id: I552ace6cce40b5e41afd300df1ddcb4d2082c7a2
Fixed: 394059605
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6425902
Commit-Queue: Noam Rosenthal <nrosenthalchromium.org>
Reviewed-by: Fredrik Söderquist <fsopera.com>
Cr-Commit-Position: refs/heads/main{#1442117}

--

wpt-commits: 90fcc6fd8576c63aa20e9e63ebc840ad61d27b48
wpt-pr: 51829

UltraBlame original commit: 87d46cad4a23d8628bdf2e9ae278a8f657553c62
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Apr 9, 2025
Automatic update from web-platform-tests
Corner-shape: interpolation

Interpolate superellipse values as per CSSWG resolution:
w3c/csswg-drafts#11608 (comment)

The values are converted to a linear range by converting
the superellipse to its half corner's X, which interpolates
on a diagonal line across the corner.

The simplified formula
(see w3c/csswg-drafts#12033) is
0.5^(0.5^(param)), and adjusted to be symmetrical for
convex/concave.

Implemented all of this in CSSSuperellipseInterpolationType,
and added an appropriate corner-shape-interpolation test.

R=fs@opera.com
CC=​pdr@chromium.org

Bug: 394059605
Change-Id: I552ace6cce40b5e41afd300df1ddcb4d2082c7a2
Fixed: 394059605
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6425902
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/main@{#1442117}

--

wpt-commits: 90fcc6fd8576c63aa20e9e63ebc840ad61d27b48
wpt-pr: 51829
with the values in between representing the curvatures in between.
The <dfn>superellipse( <<number>> | infinity | -infinity )</dfn> function describes the <dfn>superellipse parameter</dfn> of the corner.
It is a number between <css>-infinity</css> and <css>infinity</css>, with <css>-infinity</css> corresponding to a straight concave corner,
<css>infinity</css> corresponding to a straight convex corner.

The ''superellipse()'' formula can be described in cartesian coordinates, as follows,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like I still want more explanatory text here describing how only the k > 1 part of classic superellipse function is used, and is reflected for the s < 0 cases for symmetry. I don't think the text here is enough for a from-scratch implementation, which should be the goal.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some wording. I am working on a follow up PR with more detailed (but not too detailed) rendering algorithms.

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