
Creator of @CSSHooks - UI/UX and FP focus
Phoenix, AZ
Joined June 2010
- Tweets1.4K
- Following433
- Followers556
- Likes3.9K
Pinned Tweet
What if StyleX used inline styles?
I ported StyleX's own site from StyleX to inline styles and benchmarked both.
The result? The inline style version was just as fast (or faster) on every PageSpeed metric I checked.
I'm not arguing inline styles are faster. Just that performance isn’t the major concern many people claim it is. 🧵
Congrats on the stable release. I've been waiting for this!
Solid.js remains a high-priority framework integration in CSS Hooks v4-next. I'm glad it can be released against a stable version.
It's official. Solid 2.0 is finally here.
5 years ago, Signals went mainstream. Today we do the same with Async Signals.
solidjs.com/blog/solid-2-0-t…
1
19
462
Your favorite LLM codes up a complex feature for you. What's your next move: testing or code review?
3
183
Experimenting with flags in CSS Hooks. Flags determine this Panel's background, while cycle() rotates them at each nesting level.
Purely CSS-driven. No React Context or props.
How would you build this Panel in your styling framework of choice?
Flags will ship in CSS Hooks v4. For now:
npm install @css-hooks/react@next
Run it: stackblitz.com/fork/github/n…
Source: github.com/nsaunders/demos/t…
88
I've been working on a Flags API for CSS Hooks v4. Think React Context, but entirely CSS-driven. No need to re-render just because the user selected dark mode.
1
1
175
With @\scope support in CSS Hooks, you can switch to dark mode in a nested element and then back to light mode again without using React Context.
Available in v4 (`next` tag)
144
Stuck on this. It's just an <a>. The button trait safely adds styling and a11y, configured with namespaced props.
What's the next trait - longPress?
The space toggle is so good. Love at first sight back in 2023. Its superpower is unlocking :hover, @\media, and selectors in the style prop.
We have a new RFC for bringing custom enums to StyleX.
It’s syntax sugar around CSS variable toggles aka space hack to let you define a variable somewhere and then use that as a condition within CSS values.
Our API works with enums and stylex.match
3
739
A lot of emphasis lately on type-safe styling to guide agents.
CSS Hooks v4, available under the `next` tag, adds a new guardrail: It now detects conflicting properties.
If you try to mix `background` with `backgroundColor` between style objects, TypeScript catches it.
1
3
474
Everything is public and reproducible.
Run PageSpeed Insights yourself, inspect both deployments, and inspect the source.
If there's a performance dimension I missed that materially changes the conclusion, I'd genuinely like to test it.
2
1
1,403
Inline style migration
Source: github.com/nsaunders/stylex/…
Deployment: stylex-docs-mqrcm7sgh-nsaund…
1
1
1,282
If performance isn't the dealbreaker, then the interesting question becomes DX.
That's why I built @CSSHooks: Keep styles in the `style` prop, while adding the pseudo-classes, selectors, and responsive queries that native inline styles are missing.
2
9
1,257










