3 ms·
What's the opinion on re-introducing HTML attributes for style properties, eg. <div width=40pct color=red> (possibly with additional enumerated attributes usabl
by tannhaeuser 3y ago
What's the opinion on re-introducing HTML attributes for style properties, eg. <div width=40pct color=red> (possibly with additional enumerated attributes usable in short value-only syntax as in <div disabled>) rather than <div style="width: 40%; color: red">? I mean, introducing a secondary syntax for item-values, like CSS did, quite never made sense to me personally even though it was nevertheless thoroughly defended ([1]). I guess it doesn't make sense to me coming from an SGML background which had style sheets capable of stateful/automaton-based assignment of attributes for ages. But now with tailwind so popular and little more than inline styling with sane defaults perhaps, and this manifesto expressing a strong preference for markup attributes, isn't it time to come to the realization that, whatever point CSS had when it was new, surely is driven ad absurdum by its obscene syntax proliferation and extreme redundancy (something even W3C CSS WG's chairman/staff contact already was warning against over ten years ago [2])?
Personally, I don't care for web "apps", seeing the unique value of HTML rather as authoring format for web "docs". For mere apps where JavaScript is obligatory anyway, I think I'd actually prefer CSS-in-JS.
[1]: https://wiumlie.no/2006/phd/css.pdf https://wiumlie.no/2006/phd/css.pdf
[2]: https://www.w3.org/People/Bos/CSS-variables https://www.w3.org/People/Bos/CSS-variables
- timeon 3y agoFor me, it does not matter if it is inline CSS, style attributes or Tailwind. I do not like them.