Live data from Hacker News

Show HN: Basic.css – Classless CSS Starter File

github.com

1–10 of 68 posts

Re: Show HN: Basic.css – Classless CSS Starter File

#4
This feels weird. Classes exist for a reason. When I read the title, I thought about a kind of CSS reset, but what I'm seeing is also a template/grid framework?

The 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

#5
One thing I consistently dislike in these efforts is the misappropriation of HTML tags with certain semantics.

In 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.

Re: Show HN: Basic.css – Classless CSS Starter File

#6
Thank you! Brevity in code is underappreciated. People think it is about file size (and it partially is) but it is mostly about understanding what the code does so that you can extend it in the way that you want. This looks like a true foundation, unlike the namesake framework which is building on top of an existing buildings.

Re: Show HN: Basic.css – Classless CSS Starter File

#7
In the examples, form labels are used badly in a few places. The textarea label lacks its for attribute, and the radio buttons are done quite wrong: for best results, the entire group should be wrapped in a , with the prompt text (“Number:”) being a , and then each radio button’s text should be a .
Post reply on HN