6 ms·
You can address points 1 and 3 via (s)css modules. But point 2 and 4 stand.
by paulintrognon 5y ago
You can address points 1 and 3 via (s)css modules.
But point 2 and 4 stand.
- kolme 5y agoYou can also kind of address 4 by using `calc` and custom properties in CSS. (eg: `margin-left: var(--page-margin);`)
- charrondev 5y agoWe started using CSS in JS a few years ago because we couldn’t, and still are unable to use CSS variables (some of our customers still require IE11 support and we can’t drop it until 2022). The main issue I still see with CSS variables is IDE support and static validation. With my CSS written in typescript I know that every variable I’ve imported works statically.
- Keats 5y agoPoint 2 is solved if you add TS to the css modules.