Skip to content

fix(runtime): support CSS v-bind() on Lynx native - #378

Open
Huxpro wants to merge 15 commits into
mainfrom
agent/track3-pr144-rebased-20260817
Open

fix(runtime): support CSS v-bind() on Lynx native#378
Huxpro wants to merge 15 commits into
mainfrom
agent/track3-pr144-rebased-20260817

Conversation

@Huxpro

@Huxpro Huxpro commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Supersedes #144

This is the writable, rebased continuation of #144. It preserves the full intended CSS v-bind() behavior while rebasing the PR commits onto current main (4e75e3e). The original cross-fork head is read-only to the maintainer account, so it could not be updated in place.

Original #144 head: b8256b2
Rebased head: bc9d5b4

Summary

  • Adds Background-Thread-safe support for v-bind() in Vue style blocks on Lynx native.
  • Writes CSS custom properties onto component root element(s) through the ops pipeline.
  • Relies on the Lynx engine propagation fix from [BugFix] Fix CSS custom property propagation in FiberSetInlineStyles lynx-family/lynx#5912; no descendant-stamping workaround remains.
  • Updates the CSS features example and EN/ZH compatibility docs.
  • Adds focused BG-runtime regression coverage for mount, reactive updates, fragments, v-show, style-only updates, and root-only stamping.
  • Requires Lynx engine >= 3.9.0 and enableCSSInlineVariables: true; enableCSSInheritance is not required.

Rebase/conflict resolution

  • Kept current main's scoped-CSS support and newer runtime/test infrastructure.
  • Kept fix(runtime): support CSS v-bind() on Lynx native #144's final root-only CSS-variable contract and 3.9.0 compatibility wording instead of reviving its earlier O(N) descendant workaround.
  • Dropped the already-upstream entry.ts encode-data fix from this diff.
  • Removed a duplicate useCssVars export exposed by replaying the old commits over current main.

Verification

  • packages/upstream-tests: ./node_modules/.bin/vitest run --config vitest.local.config.ts src/use-css-vars.spec.ts — 12/12 passed.
  • packages/upstream-tests: ./node_modules/.bin/vitest run --config vitest.local.config.ts — 50/50 passed.
  • examples/css-features: ./node_modules/.bin/rspeedy build — web and Lynx bundles built.
  • ./node_modules/.bin/biome check . — passed (108 files on final base).
  • pnpm changeset status --since=4e75e3ef1efc17a239adaa48a665ef699a6423f5 — passed.
  • pnpm run build: internal/runtime/main-thread/plugin built locally; the final unrelated types declaration step was blocked by a missing local vue type link. The clean GitHub Build check passed on the final head.
  • GitHub CI: Build, Changeset Check, Lint, Test - Pipeline, Test - Vue Upstream, and Test - Dev Smoke all passed.
  • Vercel and Vercel Preview Comments passed.

External gates

None remaining. Native descendant-cascade behavior was previously verified on LynxExplorer 3.9.0 with enableCSSInlineVariables: true and enableCSSInheritance: false; local unit tests intentionally cover only BG op emission.

@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vue-lynx Ready Ready Preview Aug 17, 2026 8:16pm

Request Review

KealanAU and others added 15 commits August 17, 2026 20:13
…tarting dev watch

Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
- Move use-css-vars.md and LYNX-ISSUES.md from runtime/src/ to
  packages/vue-lynx/docs/ so rslib does not try to bundle them
- Restore root package.json private: true (was accidentally set to false)

Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Revert element-registry.ts and TransitionGroup.ts type annotation
changes that were rejected in PR #122 review. Add changeset for
the v-bind() CSS vars feature.

Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
… in title

Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Engine fix lynx-family/lynx#5912 landed; root-only stamping is the
correct description, not "every element".

Co-authored-by: TRAE CLI <traecli@bytedance.com>
…ersion

Standardize all references on the fix PR (#5912, closing issue #5889) and
document that v-bind() in CSS requires Lynx engine >= 3.8.1.

Co-authored-by: TRAE CLI <traecli@bytedance.com>
The #5912 propagation code (changed_css_vars, MarkCustomPropertiesDirty,
RecursivelyMarkChildrenCSSVariableDirty) first appears in the 3.9.0 tag;
3.8.1 lacks it and no later 3.8.x tag exists.

- Bump minimum engine to 3.9.0 in EN/ZH docs, changeset, and code comments
- Set enableCSSInheritance: false in css-features example so it cannot mask
  engine-level custom property propagation
- Reword root-only spec comments: they verify BG op emission only, not
  native descendant cascade

Co-authored-by: TRAE CLI <traecli@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
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.

2 participants