Skip to content

Support inline style declarations - #38

Open
cowboyd wants to merge 1 commit into
dom-get-element-by-idfrom
dom-style
Open

cowboyd wants to merge 1 commit into
dom-get-element-by-idfrom
dom-style

Conversation

@cowboyd

@cowboyd cowboyd commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

This adds a style system that hews as closely to CSS as possible. It is not, and cannot be, CSS compliant, but where CSS styles provide an answer, it uses it. It's fair to describe it as a subset of CSS.

This CSS based system is completely decoupled from TTY styling and so every property is explicitly mapped over. Included in this PR are styles for display, flex direction, spacing, borders, and CSS colors.

image

Currently there are only default styles and inline styles of an element, but we can later add style rules that match.

image

The existing style cases now run directly from original WPT sources on the native WPT base (#87). Relevant spec: CSSOM’s CSSStyleDeclaration interface.

This follows shared DOM lookup #70 in the styling stack. The focus stack starting at #75 also depends on #70.

Validation

  • 267 workspace tests and 734 upstream WPT cases pass at the styling stack tip.
  • Build, lint, formatting, and WPT package typecheck pass.

Type of change

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

Checklist

  • I have added a changeset

AI-generated code disclosure

  • This PR includes AI-generated code

I used AI to generate test cases, and occasionally suggest code snippets.

Subsequent AI assistance also includes implementation, WPT adaptations, validation, and PR splitting.

@cowboyd
cowboyd added this pull request to stack #39 October 16, 2026 20:44
@socket-security

socket-security Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedhueful@​0.8.17710010091100

View full report

@cowboyd cowboyd mentioned this pull request Oct 16, 2026
4 of 12 tasks
@cowboyd
cowboyd force-pushed the dom-style branch 2 times, most recently from e7746ec to f9a19d4 Compare October 17, 2026 04:50
@cowboyd
cowboyd force-pushed the dom-style branch 6 times, most recently from 4be9ca5 to cad609c Compare October 19, 2026 14:43
@pkg-pr-new

pkg-pr-new Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/bombshell-dev/ui/@clack/ui@38

commit: 2c8202a

@cowboyd
cowboyd force-pushed the dom-style branch 2 times, most recently from 9fb0e99 to 02de507 Compare October 19, 2026 19:31
Base automatically changed from dom to main October 19, 2026 20:58
@cowboyd
cowboyd removed this pull request from stack #39 October 27, 2026 19:30
@cowboyd
cowboyd force-pushed the dom-style branch 2 times, most recently from a778ed0 to ae299a1 Compare October 28, 2026 16:59
@cowboyd
cowboyd requested a review from natemoo-re October 28, 2026 17:05
@cowboyd
cowboyd changed the base branch from main to wpt-node-properties November 12, 2026 20:43
@cowboyd
cowboyd marked this pull request as draft November 12, 2026 20:43
@cowboyd
cowboyd removed this pull request from stack #73 November 17, 2026 18:06
@cowboyd
cowboyd added this pull request to stack #89 November 17, 2026 18:06
@cowboyd
cowboyd removed this pull request from stack #89 November 17, 2026 21:35
@cowboyd
cowboyd added this pull request to stack #91 November 17, 2026 21:35
@cowboyd
cowboyd marked this pull request as ready for review November 18, 2026 23:36
@cowboyd
cowboyd removed this pull request from stack #91 November 19, 2026 17:17
@cowboyd cowboyd mentioned this pull request Nov 19, 2026
3 of 9 tasks
@cowboyd
cowboyd added this pull request to stack #105 November 19, 2026 17:18
cowboyd added a commit that referenced this pull request Nov 19, 2026
## What does this PR do?

Add `Document.createDocumentFragment()`, fragment node identity,
descendant `textContent`, and insertion that transfers children in order
and returns the emptied fragment. Enable the corresponding original Web
Platform Tests.

This starts the shared DOM foundation used by styling (#38) and focus
(#75). The next PR, #70, adds document lookup and live collections on
top of these node primitives. The WPT runner is inherited from `main`.

## Type of change

- [ ] Bug fix
- [x] Feature
- [ ] Refactor (no behavior change)
- [ ] Documentation
- [ ] Performance improvement
- [ ] Tests
- [ ] Chore (dependencies, CI, tooling)

## Checklist

- [x] I have added a changeset

## AI-generated code disclosure

- [x] This PR includes AI-generated code
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