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. π§΅
@colinhacks Wow, instead of delivering codegen magic, extra build steps, and loads of transitive dependencies, here's a NPM package that actually makes life simpler. Well done @colinhacks - can't wait to try it out!
@laurilllll Anything the product team writes outside the layer wins. Unfortunately, the same is true for all unlayered styles. I've written about it here: https://t.co/NiW8RiGdRQ
In my first blog post of 2025, I explore a few reasons why the CSS cascade is generally something to avoid and what you can use instead. Please let me know what you think!
https://t.co/tWZGaXdxA9
@heyJordanParker@aviralj02 Also quite useful for donut scope:
@πππππ (.ππππ) ππ (.ππππ-ππππππππ) {
.πππππ {
ππππ-π πππππ: ππππ;
}
}
The .πππππ ruleset applies only until the nested .ππππ-ππππππππ boundary is reached.
@aviralj02 Yes! The ironic thing for component architecture though is that separation between markup and stylesheet that undermined local reasoning. @\scope gets more interesting when used within inline styles.
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?
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?
@jacobmparis@CSSHooks Iβve found that to be a challenge as well. I donβt think this kind of abstraction generally replaces hooks, but maybe it replaces certain hooks.
@jacobmparis Library is still in a rough state - I'm focusing on @CSSHooks v4 at the moment - but if you'd like to check it out: https://t.co/MQuKdsB4aK