Building a “Universal” CSS-in-JS library
summary
Claims a universal CSS-in-JS that maps one JS API to React Native and web, supports full CSS features (variables, media queries, pseudo selectors), and keeps near-zero runtime by emitting CSS at build time plus platform-specific JS at runtime. Implements tokens, variants, style composition via StyleSheet.create and array merging, SSR media queries to avoid flicker, and a plugin system for Webpack/Babel/SWC; used in BlueStack Style and Glue Stack UI and achieves Lighthouse 100 on a landing page.
AI-written summary · about
chapters (11)
- 0:00Introduction to Universal
- 1:15Universal vs Cross-Platform
- 2:34Adoption of Universal Apps
- 4:05Debunking Myths of RN Web
- 6:15Overcoming Technical Challenges
- 8:53Accessibility in Shared Code
- 10:18The Need for CSS-in-JS
- 13:27Styling API Inspirations
- 17:34Building the Styled Library
- 20:49Theming and Responsiveness
- 24:00Plugin System and Conclusion








