Live data from Hacker News

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

lissomware.github.io

21–30 of 48 posts

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

#21

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?

It's mainly the latter. I did consider just using a class, but ultimately settled on this solution. This approach might facilitate usage with additional CSS compilers/tooling.

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

#22
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?

I think it's not about going completely classless, but about having sane defaults and only use classes for specific components and/or elements that really need a custom style. The more traditional CSS libraries provide ton of classes, and your html is filled with classes for the basic styling.

Exactly! You shouldn't need to remember classes for styling native HTML elements, and neither should you be forced to type out , where you would be repeating yourself.

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

#27

Looks great! Working on something similar, but couldn't go through the nuances of managing every gnarly inputs. What do you think of a PR for stacking any children as equal width columns.

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

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

#29

I've just added basic form styles. More to come soon...

I was about to suggest that.

Some kind of containers that can use 1/2 1/4 of width and look good on mobile would probably be nice.

I would also add nav with mobile switch, I saw one fully in css.

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

#30

Looks great! Working on something similar, but couldn't go through the nuances of managing every gnarly inputs. What do you think of a PR for stacking any children as equal width columns.

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;}
Post reply on HN