Show HN: Basic.css – Classless CSS Starter File
1–10 of 68 posts
Re: Show HN: Basic.css – Classless CSS Starter File
#2Re: Show HN: Basic.css – Classless CSS Starter File
#3Re: Show HN: Basic.css – Classless CSS Starter File
#4The weird part is that by wrapping an article within a section now I'm designing with columns (which btw, it seems there's no way to control them). And section > article turns out to be the suggested semantics for a blog.
It's a nice effort, but what I'd look for in a starter file might not be a uncontrollable grid.
Re: Show HN: Basic.css – Classless CSS Starter File
#5In this instance, the elements should not be articles: they’re not complete, standalone items. To be sure, as https://html.spec.whatwg.org/multipage/sections.html#article... says, there’s subjectivity in deciding whether to use or , but I’m content to say that is wrong here.
(Last time I looked into one of these classless CSS starter files, it was being used for cards, which was very wrong.)
In a case like this, I’d prefer the inner elements to be or . Or better still, just start using custom element names which are perfectly valid, e.g. . There, no class. I will permit you to claim that that’s cheating and avoiding the point of classlessness; I don’t mind.
But the big pitfall of trying to go fully classless (if you interpret that as also meaning you can’t use your own custom element names) is when HTML just doesn’t have tags for the semantic concepts you’re trying to express. You want a quote, table numbered list? Yeah, we’ve got tags for those things, go knock yourself out. But you want a card? Here, have an article within a section. … what? That ain’t semantic. How’s an author supposed to guess that those tags will present like that? That’s what classes or autonomous custom elements are good for, indicating intent.