Skip to content

feat: support string styles through cssText and the style attribute - #110

Open
dreyfus92 wants to merge 2 commits into
mainfrom
feat/string-styles
Open

dreyfus92 wants to merge 2 commits into
mainfrom
feat/string-styles

Conversation

@dreyfus92

@dreyfus92 dreyfus92 commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

preact, vue and solid set string styles with style.cssText, svelte's custom renderer and plain dom code use setAttribute('style', ...), and vue and solid clear styles by removing the attribute. none of that did anything before, so string styles were silently dropped.

this adds cssText (read and write) to the style declaration, plus a small attribute changed hook, like the spec's attribute change steps, that sends style attribute changes to it. writing element.style changes back into the attribute is left for a follow up.

it's the first step toward svelte support, but useful on its own. also selects 8 upstream cssom subtests that pass now.

Type of change

  • Bug fix
  • Feature
  • Refactor (no behavior change)
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • All tests pass (pnpm test)
  • Files are formatted (pnpm format)
  • I have added/updated tests for my changes (if applicable)
  • I have added a changeset

AI-generated code disclosure

  • This PR includes AI-generated code

@pkg-pr-new

pkg-pr-new Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

commit: 1d96665

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