4 ms·
<body> <main> <p>It can be much better if you avoid abusing HTML classes for style.</p> <p>Classes are meant to describe the role of
by gioele 12y ago
<body>
<main>
<p>It can be much better if you avoid abusing
HTML classes for style.</p>
<p>Classes are meant to describe the role of
the tag, not its presentation.</p>
</main>
<aside>(use Sass instead)</aside>
</body>
--
/* Sass + Neat */
body { @include outer-container; }
main { @include span-columns(4); }
aside { @include span-columns(3); }
- Swizec 12y agoI agree. We were producing the cleanest HTML back when "semantic web" was all the rage. Around 2009 I guess?
- porker 12y agoBefore looks were everything and HTML reduced to a presentational markup? I miss them days.
- lmm 12y agoAre you kidding? The semantic web was just a bunch of extra junk layers of indirection. Schematize everything, but nothing's actually using the schemata. Replace your <i> tags with <em> tags, because that's more semantic, and easier for a screenreader to interpret (this was a real argument made at the time). Write your actual page as an XSLT on top of what we'd now call your API - but XSLT is barely human-writable, never mind human-readable.
- Touche 12y agoUnfortunately in the reason world you tend to design components that can be used anywhere in the page (and hopefully reused in different pages) so you don't get the freedom to work this way.
- blowski 12y agoUnfortunately true, although the Shadow DOM could help fix that.