Hacker News new | past | comments | ask | show | jobs | submit login

Maybe you could use data-attribute to group these common styles like 'sizing' 'color' etc

something like <div data-css-size='large flex-box display-flex' data-css-color="red" data-css-font="gotham serif"></div>

then something like [data-css-color*="red"] {color:red;}

I haven't tested this just thinking off the top what might work




I like this a lot actually, considering JIT maybe data attributes or some tighter integration into react could easily be done so there isn’t so much reliance on class names.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: