3 ms·
Seriously. This is just inline style with extra steps.
by closetohome 8y ago
Seriously. This is just inline style with extra steps.
- rvense 8y agoIt really isn't. I'd say in some cases it's the opposite. At my job, we have a mid-size React app where more or less every element has one CSS class with all the styling in it. There used to be more of a framework of reusable styles, but it doesn't get used much any more because it's out of date with what our designers want now. We should fix it, but there's no time because we have to pile on more features to fix later. You know the drill, I'm sure. But basically, for more or less every HTML tag, there's a custom blob of CSS that's only applied once. This is inline styles, we've just moved them to a different set of files.
- closetohome 8y agoI mean in the real world I think the solution is somewhere in between. I use a combination of broad and specific classes so that mass-updates are still easy, but I'm not - as you say - writing a class for every element.