Skip to content

Conversation

@mellyeliu
Copy link
Member

@mellyeliu mellyeliu commented Sep 26, 2025

Similar logic to #1244. Let's migrate to processStylexRules in steps. We use classnames alphanumeric sort internally, let's start with that to avoid visual regressions.

  1. Rollout to processStylexRules with useLegacyClassnamesSort: true and legacyDisableLayers: true
  2. Codemod legacy css to bump specificity when needed
  3. Rollout with legacyDisableLayers: false (add selector hack for CSS ordering)
  4. (stretch) Rollout with useLegacyClassnamesSort: false for size win (nice to have)

The stylesheets with these legacy configs should be identical to what we have internally.

@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 Sep 26, 2025
@mellyeliu mellyeliu marked this pull request as ready for review September 26, 2025 21:53
@github-actions
Copy link

github-actions bot commented Sep 26, 2025

workflow: benchmarks/perf

Comparison of performance test results, measured in operations per second. Larger is better.

benchmarks@0.16.0 compare
node ./compare.js /tmp/tmp.2lev6ezZiX /tmp/tmp.NHtqvR24I4

Results Base Patch Ratio
babel-plugin: stylex.create
· basic create 632 626 0.99 -
· complex create 192 191 0.99 -
babel-plugin: stylex.createTheme
· basic themes 456 447 0.98 -
· complex themes 42 42 1.00
@github-actions
Copy link

github-actions bot commented Sep 26, 2025

workflow: benchmarks/size

Comparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.

benchmarks@0.16.0 compare
node ./compare.js /tmp/tmp.wGJI4XkAr8 /tmp/tmp.ChS1UxbTgC

Results Base Patch Ratio
@stylexjs/stylex/lib/cjs/stylex.js
· compressed 1,278 1,278 1.00
· minified 3,986 3,986 1.00
@stylexjs/stylex/lib/cjs/inject.js
· compressed 1,223 1,223 1.00
· minified 3,216 3,216 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,853 99,853 1.00
· minified 747,541 747,541 1.00
@mellyeliu mellyeliu merged commit 1fcd147 into main Sep 29, 2025
9 checks passed
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.

3 participants