This isn't a long article, just a quick thought I just had.
It's no secret that one can use <custom-element>s in HTML without defining them in JS and use them only for styling.
One of the cool things about this is, ironically a restriction: Any element can only have one tag name, not several. A tag name isn't just a long list of different things that apply to an element, it's a singular statement on what it is.
That leads to an obvious question though: Isn't this what classes should be? And if that's how classes should really work, what should HTML/CSS classes be called instead?
I don't have strong thoughts on what it should be called; could be traits="...", could be mixin="...", could be anything else.
Point is, class="..." is a terrible name and should be thought of as one of those big mistakes in early web technology design, next to calling it "border-radius" rather than "corner-radius".
And despite the naming confusion, it is nice that we now have the tools to distinguish what an element is from what it does.
United States
NORTH AMERICA
Related News
UCP Variant Data: The #1 Reason Agent Checkouts Fail
7h ago
Amazon Employees Are 'Tokenmaxxing' Due To Pressure To Use AI Tools
21h ago
How Braze’s CTO is rethinking engineering for the agentic area
10h ago

Décryptage technique : Comment builder un téléchargeur de vidéos Reddit performant (DASH, HLS & WebAssembly)
17h ago
How AI Reduced Manual Driver Verification by 75% — Operations Case Study. Part 2
4h ago