Skip to content

[feat] StyleX Dev Tools Extension#1401

Open
nmn wants to merge 16 commits intomainfrom
feat/devtools
Open

[feat] StyleX Dev Tools Extension#1401
nmn wants to merge 16 commits intomainfrom
feat/devtools

Conversation

@nmn
Copy link
Collaborator

@nmn nmn commented Dec 20, 2025

What changed / motivation ?

A work-in-progress implementation of a devtools extension for StyleX and atomic styles in general.

Features:

  • Use data-style-src to list the sources of styles in order
    • Preview the relevant StyleX style objects inline
    • One click action to show the original styles in the original file in the sources tab.
    • Detect which style properties from each object are overridden
  • List all atomic styles that are actually applied by className
  • Ability to edit/override styles
  • Ensure it works without runtime injection
  • Good styles with light and dark mode
  • Good styles for editing styles
  • Show computed values on hover

Additional Context

Current Status:
(hovering on a property shows the computed style)

Screenshot 2025-12-21 at 2 12 19 AM

Pre-flight checklist

@nmn nmn marked this pull request as draft December 20, 2025 03:15
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 20, 2025
@nmn nmn marked this pull request as ready for review December 20, 2025 09:18
@github-actions
Copy link

github-actions bot commented Dec 21, 2025

workflow: benchmarks/perf

Comparison of performance test results, measured in operations per second. Larger is better.
yarn workspace v1.22.22
yarn run v1.22.22
$ node ./compare.js /tmp/tmp.CbNrVxEyzI /tmp/tmp.xxOtYTslSt

Results Base Patch Ratio
babel-plugin: stylex.create
· basic create 513 511 1.00 -
· complex create 61 61 1.00
babel-plugin: stylex.createTheme
· basic themes 409 400 0.98 -
· complex themes 32 32 1.00
Done in 0.11s.
Done in 0.40s.

@github-actions
Copy link

github-actions bot commented Dec 21, 2025

workflow: benchmarks/size

Comparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.
yarn workspace v1.22.22
yarn run v1.22.22
$ node ./compare.js /tmp/tmp.p4oknnZvXZ /tmp/tmp.DyCq2Rp7b0

Results Base Patch Ratio
@stylexjs/stylex/lib/cjs/stylex.js
· compressed 1,447 1,447 1.00
· minified 4,558 4,558 1.00
@stylexjs/stylex/lib/cjs/inject.js
· compressed 1,793 1,793 1.00
· minified 4,915 4,915 1.00
benchmarks/size/.build/bundle.js
· compressed 496,650 496,650 1.00
· minified 4,847,840 4,847,840 1.00
benchmarks/size/.build/stylex.css
· compressed 99,653 99,653 1.00
· minified 747,850 747,850 1.00
Done in 0.08s.
Done in 0.33s.

@henryqdineen
Copy link
Collaborator

I'm curious how resource-matching works when things are bundled in dev mode like in webpack/rspack. In my experimentation I found that getResources() only returns the actual resources that are loaded over the network. So if the styles are in Button.tsx and bundled into app.js how do you make that connection?

@vercel
Copy link

vercel bot commented Mar 22, 2026

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

Project Deployment Actions Updated (UTC)
stylex Ready Ready Preview, Comment Mar 23, 2026 2:37am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants