Skip to content

feat: css value styles, linear gradients and motion to auto height - #50

Closed
mateo-m wants to merge 32 commits into
remorses:mainfrom
mateo-m:feat/css-values-and-classname
Closed

mateo-m wants to merge 32 commits into
remorses:mainfrom
mateo-m:feat/css-values-and-classname

Conversation

@mateo-m

@mateo-m mateo-m commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

What this adds

The commits of feat/css-values-and-classname:

  • One css parser for style values, and one resolve pass per style.
  • width and height accept css lengths.
  • Linear gradients, corner-shape and cursor keywords.
  • Motion animates height to auto, measures the content at the resolved width, and collapses from the height auto reached.
  • render takes root options and exposes the renderer.
  • A demo of css values, classes and motion.
  • Fixes: cmd-c copies the selection, key works on a built-in tag, and compiled example apps get signed.
  • The branch tracks upstream main through a merge commit, so the diff against main stays this work only.
  • The zed submodule points at this fork.

What I ran and saw

  • cargo test in packages/native at this branch: 291 passed, 0 failed.
  • The react suite at this branch: 414 passed, 0 failed. The motion stall the first version of this PR described is gone. It came from a pointer capture that bound to the wrong hitbox and from lineHeight: 20 read as a multiple. Both fixes are in this branch, with tests.
  • A JS lineHeight number is pixels, as upstream reads it. Only a string gets the css multiple reading. A unit test covers each reading.

What I did not verify

  • Windows and Linux. Every run above was on macOS. CI builds the other targets.

Moved from the fork

This PR was mateo-m#1.

The branch merged upstream main twice, at 3e2d121 and at 028f70a. The second merge takes the batch-only mutation API, the root key handlers, click through on_mouse_up and the object form of a gradient background. The object form keeps its colorSpace: Scope::gradient builds the GPUI gradient in sRGB or Oklab. The text form stays sRGB, because lightningcss does not parse in oklab.

The history was rewritten once after the first push. It dropped the commits that reworded AGENTS.md, and the zed pin moved to the rewritten mateo-m/zed branches. No code changed in that rewrite.

On the merged head: cargo test 318 passed, 0 failed, the react suite 458 passed, 0 failed, the examples suite 64 passed, 0 failed. bun run build in packages/native regenerated index.d.ts.

Bottom of the stack.

The zed submodule points at the mateo-m/zed fork until remorses/zed#5, #6 and #7 merge. Then a follow-up commit restores .gitmodules to remorses/zed on the gpuix branch and pins the merged commit. The same GPUI stack is also open upstream as zed-industries/zed#63771, #63772 and #63773.

mateo-m added 30 commits August 25, 2026 16:59
# Conflicts:
#	.github/workflows/ci.yml
#	examples/compile.ts
#	packages/native/src/custom_elements/anchored.rs
#	packages/native/src/custom_elements/code.rs
#	packages/native/src/custom_elements/diff.rs
#	packages/native/src/custom_elements/img.rs
#	packages/native/src/custom_elements/input.rs
#	packages/native/src/custom_elements/markdown.rs
#	packages/native/src/renderer.rs
#	packages/react/src/types/host.ts
#	zed
@mateo-m mateo-m closed this Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant