Skip to content

Resolve radial gradient length color stops against the horizontal radius - #60173

Open
intergalacticspacehighway wants to merge 1 commit into
react:mainfrom
intergalacticspacehighway:fix-radial-length-stops
Open

intergalacticspacehighway wants to merge 1 commit into
react:mainfrom
intergalacticspacehighway:fix-radial-length-stops

Conversation

@intergalacticspacehighway

@intergalacticspacehighway intergalacticspacehighway commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary:

Fixes #59968.

Radial gradient length color stops were resolved against the larger radius. Per spec, the gradient line "extends toward the right", so they should resolve against the horizontal radius.

Changelog:

[GENERAL] [FIXED] - Resolve radial gradient length color stops against the horizontal radius

Test Plan:

Added an RNTester example. Compared with Chrome:

Before and after on iOS and Android, compared with Chrome

Length color stops in an elliptical radial gradient were resolved against
max(radiusX, radiusY), while the ellipse is drawn with radiusX as its
horizontal radius. On an ellipse taller than wide, every length stop landed
closer to the center than in browsers.

CSS Images 3 places radial color stops on a gradient line that starts at the
center and "extends toward the right", so length stops resolve against
radiusX: https://drafts.csswg.org/css-images-3/#radial-color-stops

Fixes react#59968.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 20, 2026
@intergalacticspacehighway intergalacticspacehighway added the p: Expo Partner: Expo label Nov 20, 2026
@intergalacticspacehighway
intergalacticspacehighway marked this pull request as ready for review November 20, 2026 04:35
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Nov 20, 2026
@github-actions

Copy link
Copy Markdown

Visual regression

1 visual difference(s) at c52f12fa41c8. Visual differences need maintainer approval. Review the report, then apply visual-change-approved.

ios scroll-view/horizontal-scroll-to/end: Changed, 170418 px (44.437%)

diff

Expected and Captured
Expected Captured
expected captured

@meta-codesync

meta-codesync Bot commented Nov 20, 2026

Copy link
Copy Markdown

@javache has imported this pull request. If you are a Meta employee, you can view this in D133460463.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Expo Partner: Expo Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Radial gradient: length colour stops are measured against max(radiusX, radiusY), so on a tall ellipse they land short

2 participants