Top
Best
New

Posted by mpweiher 9/7/2025

Pico CSS – Minimal CSS Framework for Semantic HTML(picocss.com)
376 points | 108 commentspage 3
stgr_codes 9/7/2025|
Really love how this project is evolving. It helps you write components with better accessibility without compromising maintainability (it actually improves it) and it's easy to customize.
rodolphoarruda 9/7/2025||
Pico is great! It's nice to see it hitting HN front page.
rimmontrieu 9/7/2025||
I use tailwind but sometime extremely lightweight CSS framework like Pico is a good starting point to build the foundation for any projects.
euroderf 9/8/2025||
OT-ish but, can someone point me to a minimal framework that does collapsible trees ?
lobsterthief 9/8/2025||
You will need to write custom CSS, but collapsible trees are totally possible to do purely in CSS in any framework via a simple combination of checkboxes, labels, pseudo-classes and CSS combinators.

The `:checked` selector allows you to target checkboxes that are checked. So you can have a set of checkboxes (off screen with an absolute negative position or similar) that are controlled via a <label> element that wraps the + or - text in the tree. Then based on its state, you can target elements directly afterward to be expanded or contracted using the CSS adjacent sibling combinator.

Checkboxes are neat because they provide state management natively in the DOM and you can do a lot via CSS based on that ;) Thus, you have pure HTML and CSS collapsible trees.

clarkdale 9/8/2025||
98.css has this with the details html element
indigodaddy 9/7/2025||
FastHTML uses Pico CSS by default
ixxie 9/8/2025||
I love the idea, but why can't I install with npm and import as plain CSS?
Leftium 9/10/2025|
https://picocss.com/docs#install-with-npm

    npm install @picocss/pico
All the built/minified CSS is distributed in the package, too:

https://www.npmjs.com/package/@picocss/pico?activeTab=code

potato-peeler 9/8/2025||
Does not work in older browsers, iOS 13.6

Strangely latest bootstrap works just fine.

tcdent 9/7/2025||
yeah but does claude know how to use it?
minimaxir 9/7/2025||
LLMs may know the v1 version of PicoCSS, which has some differences from the current v2 (e.g. no SASS).
lagniappe 9/7/2025|||
Claude knows how to use plain HTML.
mariocesar 9/7/2025|||
Yes it does
dalemhurley 9/7/2025||
agents.md will help if it doesn't
keysdev 9/8/2025||
How does this compare to pure css?
IgorPartola 9/7/2025|
I honestly can no longer tell which “minimal CSS frameworks for semantic HTML” I have not seen on the front page of HN and which are repeats. Are they all the same at this point?

Not specifically picking on this one, just that it seems that they are the quick to crank out type of libraries and everyone has their own.

Retr0id 9/7/2025|
The neat thing about semantic HTML is that the CSS ought to be pretty interchangeable.
IgorPartola 9/7/2025|||
Sure but why would I do that? When was the last time you decided that the solution to whatever problem you were facing was to switch to a completely different CSS framework without rewriting your HTML?
turkey99 9/8/2025|||
I’ve had this scenario several times.

The last was when the company I worked for was acquired. We needed to adopt their CSS library for all our applications.

I changed their component based library to have semantic style css and dropped it right in.

eternityforest 9/9/2025||||
For entertainment related stuff where you want really deep themability, a lot of popular frameworks seem to rely too much on non semantic classes that make it hard.
giveita 9/7/2025|||
The real neat thing is not having to make decisions up front. But you can tweak it later. If you are a rebel you could even use classes to touch up bits you are not happy with.
IgorPartola 9/7/2025||
What I am saying is that I have never done this, have seen the need for this, or have heard of anyone doing this or having the need for this.

To create an absurdist analogy it is like saying that because labels on cotton T-shirts are the same size that you could take them off shirt A and sew them onto shirt B. It is possible by there is zero point in doing it other than to say that you did it.

giveita 9/8/2025||
Correct, there is no need. It is more of a preference, maybe a challenge or code golf type of thing. One advantage is less thinking / decision / boilerplate is needed when adding elements.

Semantic:

p

Normal:

p class=paragraph

Utility:

p class=mx-1 py-1 my-2 text-medium

It is like buying a medium shirt rather than getting a tailor-made t-shirt.

vehemenz 9/7/2025|||
You're mixing "is" and "ought." Why ought styles be interchangeable (remembering that stylesheets and DOM structures often have complex, dependent relationships that are rarely as simple as Pico or anything similar).
Retr0id 9/7/2025||
I said what I meant to say, I don't understand your reply.