Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new easing data is parsed and stored but (based on in-repo references) is not yet plumbed into the rendering path, so the PR’s stated behavior isn’t actually implemented end-to-end.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds support for specifying an <easing-function> between two linear-gradient() color stops (per CSSWG proposal issue 1332), and updates the demo/tests to exercise the new syntax.
Changes:
- Parse
ease*keywords andcubic-bezier()as an easing “stop” between two gradient stops in the native CSS background reader. - Add a React renderer pixel test asserting eased vs linear mixing differences.
- Expand the demo gradients page (and demo test harness) to include easing examples, plus a new “sticky header” showcase; add a changeset for release.
File summaries
| File | Description |
|---|---|
| packages/react/src/tests/styles.test.tsx | Adds a pixel-level test asserting eased mixing differs from straight interpolation. |
| packages/native/css/src/background.rs | Extends linear-gradient() parsing to extract and validate easing functions between stops and store them on stops. |
| examples/demo/gradients.tsx | Adds easing examples and a sticky-header demo using gradient easing in maskImage/backgroundImage. |
| examples/demo.test.tsx | Registers the gradients panel in the demo test panel list. |
| .changeset/eased-gradients.md | Declares minor bumps for @gpuix/native and @gpuix/react to ship the feature. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Owner
Author
|
Moved to remorses#51. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contains #1.
What this adds
An
<easing-function>between two colour stops bends the mix, following the CSSWG proposal in csswg-drafts issue 1332:linear-gradient(to top, black, ease-in-out, transparent).ease,ease-in,ease-out,ease-in-outandcubic-bezier()are read.On this branch the easing paints as the GPUI colour hint whose curve crosses one half at the same place. That matches the true curve at both ends and at the midpoint. The next branch bumps the zed pin and solves the curve per fragment in the shader, which replaces the approximation. An explicit hint in the css wins over the easing.
What I ran and saw
cargo testat this branch: 294 passed, 0 failed. Unit tests cover the half-point search and the explicit-hint priority.What I did not verify