Stop bouncing between files. Use pseudo-classes, selectors, and responsive queries directly within the style prop. You get the power of CSS where it makes the most sense—on the target element itself—without the className overhead.
Keep styles and markup in the same context. When components are self-contained, you stop hunting through external stylesheets to find a layout bug. You can refactor confidently, knowing your changes are scoped exactly where they're written.
Catch errors in your editor, not the browser. Every property and value is fully typed, eliminating magic strings and non-standard shorthands. Because styles are just plain objects, your existing refactoring tools and type-checking work out of the box—no custom IDE plugins or complex configurations required.
Eliminate the complexities of specificity, source order, and cascade layers. By defining styles directly on the target element, you ensure that they render exactly as intended. Since the styling logic lives in your component rather than a complex global stylesheet, you can say goodbye to hydration mismatches and flashes of unstyled content.
This approach combines the modularity of runtime CSS-in-JS with the performance of static CSS. A tiny stylesheet added once at startup handles the plumbing, and CSS variable fallbacks handle the rest—ensuring that your styling payload stays proportional to your active UI instead of your entire application. All without the overhead of client-side style injection.
Mark Dalgleish@markdalgleishCheck out CSS Hooks. This is *very* cool.
It lets you write type-safe inline styles (literally the `style`attribute *BUT* with support for a custom set of pseudo-classes, selectors, media/container queries — and nested too!
Ryan Florence@ryanflorenceThat's how I always wished the style prop worked!
Mykhaylo@mryechkinI absolutely love it. There's just something "fresh" about it. Simple to get started, practically no overhead, and it just makes sense. Best part is that it does this all using native CSS features, nothing fancy - just really cleverly done.
Nicolas@nicolas_dev_Looks exactly like what I always wanted the style property to be
Will be trying it out for sure!
Julien Delort@Julien_DelortI was _hooked_ at "no build step"!
Benton Boychuk-Chorney@b_e_n_t_e_n_I'm curious if there is a "catch" to css hooks, because from first glance it seems too good to be true!