Post

Still writing DIV-soup? ANY tagname with a dash becomes a valid HTMLElement, NOT HTMLUnknownElement as some gurus claim. That means you can replace ALL DIVs with semantic HTML. Absolutely NO JavaScript required, only HTML and CSS! Should we call them "Web Components"? You tell me #webcomponents

Interesting! I can’t tell if it’a brilliant or mad. One downside might be naming conflicts when importing web components and that might be hard to debug. But, I like using less divs

0 reposts0 likes

> naming conflicts when importing web components That is an "issue" with ALL Web Components, and why 𝙎𝙘𝙤𝙥𝙚𝙙 𝘾𝙪𝙨𝙩𝙤𝙢 𝙀𝙡𝙚𝙢𝙚𝙣𝙩 𝙍𝙚𝙜𝙞𝙨𝙩𝙧𝙞𝙚𝙨 are on the horizon The author defining a <𝙢𝙮-𝙘𝙤𝙢𝙥𝙤𝙣𝙚𝙣𝙩> WITH JavaScript *first* is in control, NON-defined Components will be overwritten. Later defines will fail.

No different than tools injecting global CSS classnames into your DOM If you are the HTML author, and you don't want your undefined HTML overwritten. Add one line of JavaScript to "define" that element. Hmm... you can NOT do that to protect your precious CSS