There is a diverse range of philosophies when it comes to CSS. Settling on something that fits the needs of your team and application can be a real challenge. Mark Dalgleish, the co-creator of CSS Modules, has been working on an option that might make that choice less of a challenge!
Vanilla Extract is kind of like "CSS-modules in TypeScript", allowing you to write CSS in your TypeScript, with locally scoped variables, and generate static CSS files on runtime. If you're interested in getting a deeper look, as well hear more about design systems, CSS in JS, and CSS Modules, check out this episode!
Homework
- Follow along with this blog post - Use CSS Variables instead of React Context
- Check out Vanilla Extract
Resources
Guest: Mark Dalgleish
- Twitter: @markdalgleish
- GitHub: @markdalgleish
Host: Kent C. Dodds
- Website: kentcdodds.com
- Twitter: @kentcdodds
- GitHub: @kentcdodds
- YouTube: Kent C. Dodds
- Epic React: epicreact.dev