Live data from Hacker News

Show HN: Lissom.CSS - A classless, minimalist, and themeable CSS library

lissomware.github.io

41–48 of 48 posts

Re: Show HN: Lissom.CSS - A classless, minimalist, and themeable CSS library

#42
post #39

Nice work! I like that you have included support for prefers-color-scheme, which is one of the more highly-requested features for these kinds of frameworks. I've added Lissom to the big list of minimal CSS frameworks [0] which aims to collect all of these types of projects (more or less) in one place for ease of discoverability and comparison. You can preview the CSS on some HTML5 boilerplate here [1]. [0]: https://g…

Thank you for adding Lissom.CSS to the list. Indeed, I think that all modern websites should account for `prefers-color-scheme`, now that it has been supported by virtually every browser for several years.

Re: Show HN: Lissom.CSS - A classless, minimalist, and themeable CSS library

#45

Firstly, let me say that this looks great. I really like the classless approach. One minor question/nitpick: > To make a button primary, add the data-primary attribute to it. For things like this, I feel like a class would be ok while still calling the library "classless". Is there some advantage to using a data-* attribute here or is it just to retain "purity" of the classless tagline?

That caught my attention immediately. It just seems like a hacky, roundabout way to avoid using classes for different button styles, which to be clear, are an example of exactly why classes exist.

Re: Show HN: Lissom.CSS - A classless, minimalist, and themeable CSS library

#46

Firstly, let me say that this looks great. I really like the classless approach. One minor question/nitpick: > To make a button primary, add the data-primary attribute to it. For things like this, I feel like a class would be ok while still calling the library "classless". Is there some advantage to using a data-* attribute here or is it just to retain "purity" of the classless tagline?

I like the distinction. It separates effects applied by the library from affects applied by your custom class, since you can still add a class if you like. At a glance, I know where the effects are coming from.

This is a good point. It also makes reasoning about classlists more clean, if all are guaranteed to be managed by your own code.

Re: Show HN: Lissom.CSS - A classless, minimalist, and themeable CSS library

#47

Earlier quoted context omitted.

Like `display: flex; flex-direction: column; width: 100%;`?

section { display: flex; flex-wrap: wrap; } section > * { flex: 0 0 auto; } section > *:not(:last-child) { margin-right: 1rem;}

Personally that is a terrible idea. should be used for semantic purposes, not layout.

Also, why not use "gap" instead of "margin-right-but-not-last-child"?

Re: Show HN: Lissom.CSS - A classless, minimalist, and themeable CSS library

#48
post #14

I’m curious, what is the benefit from going “classless”? In my CSS usage, classes have been very useful. Why would you not want to use classes?

Thanks for the feedback. That is pretty much how I have approached things but I was wondering if I was missing some “gotcha” about classes.
Post reply on HN