4 ms·
> No they don't. They do. They use tags and semantic structure to figure out what to read when. You also skipped the "and other assistive technology" part of
by Skinney 2y ago
> No they don't.
They do. They use tags and semantic structure to figure out what to read when.
You also skipped the "and other assistive technology" part of my sentence. Tools for navigating, or alternative rendering, improves when your site is semantic.
I use these tools every now and again, I'm not basing this on theory.
> You still need class names,
Not as many. If you use divs and classes everywhere, you end up using classes for semantic meaning.
> You have components that are shared between pages, so you either have to include all your CSS on every page
Use classless CSS as far as you can, use site-specific (layout) stylesheets, and use webcomponents for those components that are truly novel. Webcomponents with shadow dom means it can include it's own stylesheet without affecting the rest of the site.
In many cases, you get by with just classless CSS. Site-specific layout is a one-liner. Webcomponents bring their own styles.
So no, you don't need to bring an entire JS UI framework for this.
> You're always going to need JavaScript eventually
Depends entirely on what you're building, and a lot of the time you can get away with something simple like HTMX and JQuery.
But even if you do end up needing a JS framework for some portion of your site, limiting the amount of stuff that needs to be handled by this framework _greatly_ reduces the amount of complexity, and amount of code, that the developer has to write.
- lmm 2y ago> If you use divs and classes everywhere, you end up using classes for semantic meaning. You're always going to use classes for semantic meaning anyway, because the HTML standard doesn't and can't define all the semantic distinctions that will be relevant in what you're making. > use webcomponents for those components that are truly novel. Webcomponents with shadow dom means it can include it's own stylesheet without affecting the rest of the site. I guarantee you the author of this rant hates webcomponents even more than they hate Javascript. (Indeed I'm pretty sure they qualify as a "JS UI framework"). > But even if you do end up needing a JS framework for some portion of your site, limiting the amount of stuff that needs to be handled by this framework _greatly_ reduces the amount of complexity, and amount of code, that the developer has to write. You can draw an arbitrary line and say JS is "code" and HTML and CSS are "not code", but that doesn't actually make them any simpler to understand. Expressing your whole site in the same framework used the same way results in something that's much easier to read and maintain.