3 ms·
There is some clever (maybe too clever) stuff in here, but isn't this pretty much inline styles with new non-standard albeit shorter property names? If I'm goi
by montroser 6y ago
There is some clever (maybe too clever) stuff in here, but isn't this pretty much inline styles with new non-standard albeit shorter property names?
If I'm going to have to add `style="--bg:cyan"` all over the place, I'd rather just stick with the standard `style="background:cyan"` so that my dear colleagues and I can avoid having to learn and relearn whatever cute names each next microframework comes up with.
In my experience, functional CSS can be great if it's limited to a very small set of very common properties with a smallish set of common values. But this seems much closer to how we did in the 90s back when it was a free-for-all...
- httpsterio 6y agoyep, basically. Same why reason why I find working with Tailwind or CSS-in-JS bothersome and wrong, you are mixing semantics and styling both within the HTML. Ideally CSS would be interchangeable and HTML stays the same nonetheless but when you're bolting your default stylings like this to your markup, it's hard to get rid of. This hurts accessibility, customiseabilty and future proofing.
- ciar4n 6y agoJust to mention the conventional inline styling like `style="background:cyan" does have some limitations, mainly that they cant be responsive and cant effect pseudo-classes.
- montroser 6y agoYeah, fair point. A long time ago there was a proposal spec for styling pseudo classes via inline styles, but it didn't take.