3 ms·
I agree. In addition, with each year comes a new "super-duper-real-correct-semantic" way of doing it. That word semantic. It grates me. Everyone uses it to
by parksy 13y ago
I agree. In addition, with each year comes a new "super-duper-real-correct-semantic" way of doing it. That word semantic. It grates me. Everyone uses it to back their argument, then throws their hands up and "case closed". The meaning has been lost.
Like now we have to:
<div class="write">
<div class="write__our">
<div class="write__our__classes">
<div class="write__our__classes__like">
<div class="write__our__classes__like__this">
</div>
</div>
</div>
</div>
</div>
<div class="instead">
<div class="of">
<div class="like">
<div class="this">
</div>
</div>
</div>
</div>
Which "old me" says is disgusting and breaks the rules of semanticism. The DOM loses meaning and becomes a vessel for the form / appearance. But I get why people do it. It's pragmatic. I don't like it, but it works.
Regardless of the real real true real true way of doing things and all the arguments that people like to have about that, it's obvious why people are constantly trying to find these conventions and rules of thumb. It's because form and function are not properly separated with CSS alone. Using the DOM purely as a vehicle of function makes forming difficult, while pulling form into the DOM level muddies up the goal of semantic documents - the idea that a machine should be able to comprehend the nature of (X)HTML content has fallen to the wayside but that's a separate argument (should documents be sources of truth, isn't that what REST is for, are entities documents, etc).
The thing is that XML & XSLT got us oh-so-close. Nice, lovely pure XML documents with clean semantic tags and attributes with strongly typed definitions that had meaning to both humans and machines. A transform step converted these into an XHTML presentation format, adding whatever DOM sugar was needed for the CSS and JS to do its thing. It was almost there.
Where it fell down is where I think you hit the nail on the head. Both CSS and JS are needed currently to do very basic things, with a lot of overlap for things like positioning or animating transitions.
A single layout language that handles _everything_ in an intuitive way without having to navigate the CSS+HTML+JS love triangle would be fantastic.
Sorry for the somewhat longwinded response for what is otherwise a "me to" comment. I guess I just needed to vent a little - long day at the office and all :/