News for hackers. Stuff that matters.
Re:Real-world CSS vs. CSS-in-JS performance comparison by paulintrognon on Tuesday June 08, 2021 @04:48PM (#27440593)
You can address points 1 and 3 via (s)css modules.

But point 2 and 4 stand.

Re:Real-world CSS vs. CSS-in-JS performance comparison by kolme on Tuesday June 08, 2021 @05:14PM (#27440904)
You can also kind of address 4 by using `calc` and custom properties in CSS.

(eg: `margin-left: var(--page-margin);`)

Re:Real-world CSS vs. CSS-in-JS performance comparison by charrondev on Tuesday June 08, 2021 @06:06PM (#27441613)
We 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.

Re:Real-world CSS vs. CSS-in-JS performance comparison by Keats on Wednesday June 09, 2021 @04:57AM (#27445757)
Point 2 is solved if you add TS to the css modules.