Our great sponsors
-
CSS Modules, gives us two ways of sharing variables, the Interoperable CSS (ICSS) spec and the PostCSS Modules Values spec. ICSS appears to be the older of the two specifications, so I'll start there.
-
The above should work in Create React App out of the box. If you are rolling your own Webpack configuration (may God have mercy on your soul), you'll need to configure modules with a compileType of icss:
-
Appwrite
Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!
-
// breakpoints.module.css @value larry: (max-width: 599px); @value moe: (min-width: 600px) and (max-width: 959px); @value curly: (min-width: 960px); // MyComponent.module.css // this is one of the multiple ways you can import @value definitions // see https://github.com/css-modules/postcss-modules-values @value larry, moe, curly from "theme/breakpoints.module.css"; @media larry { ... } @media moe { ... } @media curly { ... }
-
Aphrodite
Framework-agnostic CSS-in-JS with support for server-side rendering, browser prefixing, and minimum CSS generation
I've already mentioned Emotion, but other CSS-in-JS libraries to check out include Styled Components, JSS, Theme-UI, Radium, and Aprhodite.
Related posts
- Faster React apps coding: How to migrate from Emotion CSS-in-JS to Stylify Utility-First CSS
- New integration guide: Symfony PHP framework
- I built an integration guide for Symfony, Tailwind CSS and Flowbite
- How to Effortlessly Migrate from Styled Components CSS-in-JS to Stylify Utility-First CSS for Better React Development. | Stylify CSS
- How to Effortlessly Migrate from Styled Components CSS-in-JS to Stylify Utility-First CSS for Better React Development.