Research
Is StyleX worth choosing over Tailwind?
This site and the Storybook playground are built with StyleX only. Every finding below was reproduced here, not just read about. The full write-up lives in docs/.
Deterministic merge
goodstylex.props(a, b) resolves per property, shorthand-aware. No tailwind-merge, no class-order surprises.
Typed style contracts
goodComponents expose sx?: StyleXStyles and can restrict which properties callers may touch.
Tokens are imports
gooddefineVars / defineConsts live in a shared package; a typo is a compile error, not a dead class.
Token files are rigid
paindefineVars must live in *.stylex.ts with named exports only. You cannot define a token beside the component.
Cascade layers bite once
painuseCSSLayers puts StyleX under UA styles; a:link / a:visited need an unlayered reset.
Styling at a distance is deliberate work
painParent-state child styles need defineVars or stylex.when + markers. One selector in CSS, three touch points here.