Ask HN: Good resources for DIY-ish animatronic kits for Halloween?
4 points by xrd 1d ago 0 comments
Why the Technological Singularity May Be a "Big Nothing"
7 points by starchild3001 1d ago 8 comments
Pico CSS – Minimal CSS Framework for Semantic HTML
358 mpweiher 105 9/7/2025, 8:31:38 PM picocss.com ↗
[0]: https://neat.joeldare.com/
I use it for almost everything. I just made a note to try it with the demo and to steal some ideas from pico (while keeping the size of neat tiny).
https://picocss.com/docs/usage-scenarios
I discovered Pico CSS just last week, and it turned out to be exactly what I needed for a small Hugo theme (govanity, vanity URLs for Go modules/packages with Hugo: https://github.com/foundata/hugo-theme-govanity). From discovering Pico, reading the docs, and integrating it, I was done in about two hours.
One thing that's surprisingly easy to overlook in between: CSS variables: https://picocss.com/docs/css-variables and Colors: https://picocss.com/docs/colors
Maybe just a little upstream.
It’s easiest to start with Pico (especially classless) and the make the decision on where to go, when you decide to add classes whether it’s continue with Pico, easily head towards Tailwind, or something else.
https://www.cssbed.com/
1 - https://github.com/sindresorhus/github-markdown-css
There are some nice one there, surprised many weren’t mobile-first or mobile-friendly.
Pico looked nice on mobile though.
Tailwind CSS vs. Pico CSS (2022) - https://news.ycombinator.com/item?id=41511420 - Sept 2024 (48 comments)
Htmx, Raku and Pico CSS - https://news.ycombinator.com/item?id=41482679 - Sept 2024 (153 comments)
Pico CSS v2 comes with 380 manually crafted colors - https://news.ycombinator.com/item?id=39488979 - Feb 2024 (12 comments)
Pico CSS Framework - https://news.ycombinator.com/item?id=29559961 - Dec 2021 (101 comments)
[1]: https://g5t.de
https://www.w3schools.com/TAGS/tag_embed.asp
https://www.w3schools.com/TAgs/tag_object.asp
In my 25 years of experience writing HTML and CSS most engineers don’t understand semantic HTML, nor do they take the time to learn it; largely because companies don’t value it, unless they’re heavily SEO-focused companies.
I once worked at a company that would run an HTML5 validation test in our CI/CD pipeline. That was very helpful as it identified invalidly nested elements and taught proper semantic HTML.
Unless one likes using tables instead or spacer gifs.
It’s nice html has options beyond. divs now too
Can you explain a bit how you are using HTMX?
Pointer is great if you have it...
HTMX and Pico are baked into HARC stack - the rationale for this is that HTMX (as the antidote to React) enables non TypeScript languages on the server side. Of course, then you need a library that will help you write your server! That's where HARC stack comes in.
For example, on the raku.org front page you will see a set of button/tabs that select specific code examples - each one of these does...
These results in a more lightweight page and the ability to run code to render the tab content on demand. It's probably overkill for this site rather static needs, but the Air::Base component library tilts towards active HTMX controls wherever possible.hth
I love the focus on semantic HTML, because it matches how I write CSS. The HTML should be as pure and as style-agnostic as possible.
pico.classless.css is 2458 lines long.
> Not fond of Pico.css’s weight, though: over 50KB, nowhere near as lightweight as the name suggests (even if it’s above-average compressible, 8KB gzipped—but I wouldn’t count even 8KB uncompressed as pico); in this case, if you flatten the variables and strip unused code, you’re left with under 4KB (~1.4KB gzipped). Lots of bloat from unused light mode support, things like form controls, and a fair bit of frivolous custom properties usage. This is the sort of place where I see the appeal of the likes of Tailwind, because they generate such huge amounts of CSS that you just about have to use an unused style remover. But it is another build step, and contrary to the deliberate intent here.
And it sounds like it has grown further. I don’t see 71kb, I see 83KB (11.6KB gzipped, 10.1KB brotli). At that point I wouldn’t even call it small, and it’s even getting past medium-sized into large territory.
And I think this is so minimal
I’ve been thinking about creating a CSS tool somewhere about halfway between new.css and Pico CSS for very basic page layout tools (containers, callouts, menu bars, etc) that still focuses on being extremely small and performant.
I feel that a tool like that would be helpful for laying out a simple but functional site (sourcehut’s site [1] comes to mind) where you need a few basic layout tools but don’t need all of Bootstrap.
[1]: https://sourcehut.org/
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.
<!-- Like his --> <div class="px-4 py-2 bg-blue-500 text-white rounded shadow-md hover:bg-blue-600">
<!-- Instead of this --> <div class="btn-primary">
You get used to reading any code the more you read it.
As I understand it, the main point of semantic web is making the web machine readable, often using languages specifically designed for that task that are not HTML.
Semantic HTML is more concerned with writing standardized HTML that leverages browser capabilities and respects users who use assistive technology to browse the web.
Frankly, I don't see what this framework has to do with either. I was curious about how they implemented the dropdown menus, and they're specially styled <details> elements, which are normally used for accordions. That seems a bit strange to me, because the obvious choice for a dropdown is the <select> element.
Here’s a uBlock Origin style I use for hackernews, for example:
Me neither!
> you can simply remove or add classes as you need
That sounds like exactly what I was thinking when you said class soup.
> you don't have to dig through loads of CSS files to figure out where the CSS is
The CSS should be in your components, or in a .css file beside your components at worst. React having bad defaults doesn't need you need to change to adding 20 classes to every HTML element.
Instead of if you'd just given them all the same semantic class ".config-button" or ".sidebar-button" or ".btn-hero" or whatever, you could make that change in a single place.
If your CSS has turned into soup, I have to be blunt: you're doing it wrong. And you should never have to "dig through loads of CSS files to figure out where the CSS is", it's 1) literally in your browser inspector when you select the element and 2) your CSS files should be organized so it would be easy anyways. Finding a class is as easy as finding a function definition.
Utility classes are for people who want to throw away all the benefits of semantic naming because they don't want to go to the trouble of actually organizing their user interface, even though they see the value in organizing the rest of their code. I honestly don't get it.
Good class and ID names should be semantic, just like the markup. Don't describe what the CSS does; describe what the element is.
Not only that, but it introduces useless abstractions that could've been avoided by just writing CSS directly. How is `.content-center` better than `align-content: center`?
Tailwind and its ilk are one of the worst trends to have ever happened in web development. It's making people forget how to use CSS, while being useless in the process. I truly don't understand it. And, yes, I've worked on projects that used it extensively. It's awful.
Quick iteration and good relative spacing for margins, paddings, dimensions etc.
A lot of people combine Tailwind with something like Vite so they're getting instant previews and don't need to swap focus to a style sheet to style their component. I swapped to Tailwind and honestly could never swap back.
You're raising a bunch of meyerweb talking points from 2003, except why? WHY does markup need to be "semantic" in the sense that you mean? Actually, WHY? Provide a supporting argument that it makes a difference to developers or end users. Remember, we've all been doing it that way for years, and we switched to Tailwind. You need to have something more compelling to developers who have already made up their minds.
> Not only that, but it introduces useless abstractions that could've been avoided by just writing CSS directly. How is `.content-center` better than `align-content: center`?
There are several reasons, but media queries would be reason 1. Why is it useless, again? Remember, we can't tell what your high-level abstractions do without opening at least two files, plus we have to understand any inherited/cascading rules on top of that. If that complexity doesn't matter, then it's argument time again.
> It's making people forget how to use CSS
Tailwind relies on CSS for its class names. How would one use it without knowing CSS in the first place? Secondly, why would it be bad (argument time again)?
The reasons for Tailwind are well understood. It's way faster, trivial to pick up, and easier to maintain longterm, especially in a team environment, than bespoke CSS/DOM abstractions that have layers of hidden complexity. Now, what does your way of doing CSS offer? Remember, tons of people switched from older methodologies to Tailwind and have already priced in the benefits, small as they were.
If you've been hearing about this since 2003, then I shouldn't have to repeat the reasons here. You can look up countless articles that explain exactly why semantic HTML and CSS are a good thing much better than I can do justice here.
> There are several reasons, but media queries would be reason 1.
That still doesn't explain why e.g. `class="w-16 h-48 md:w-32 lg:w-48"` would be preferable over a single class that describes what the element is and defines how it should look like and behave.
I mean, to steel man your argument, I get the appeal of getting predefined and consistent breakpoints, and being able to prefix or suffix classes with sizes. But that doesn't seem like a worthy tradeoff for losing legibility, and polluting the markup with this noise. It's the same as declaring all CSS inline, except using classes.
> Remember, we can't tell what your high-level abstractions do without opening at least two files
A good class name will tell you what the element is, not what it should look like. For that, you look at the CSS. Whether that CSS is defined in the same file or in another file, is up to you.
> plus we have to understand any inherited/cascading rules on top of that
Yes, that is what the "C" in CSS stands for, and it's a useful feature for propagating and combining rules without having to redefine them on every element.
If you want to avoid this "complexity", there are numerous ways to scope rules to a specific element or component. Most modern frameworks can scope styles per component for you. And with cascade layers, you now have more control over how and when rules are applied.
> Tailwind relies on CSS for its class names. How would one use it without knowing CSS in the first place?
Some class names are straightforward to understand and use, but others, like the example I posted above, require knowledge about Tailwind itself. Users can become proficient with this syntax without ever understanding what's happening underneath, thus degrading their CSS knowledge. You said it yourself—you want to avoid looking at CSS files altogether. How long would it take for you to not be able to write CSS directly?
> It's way faster, trivial to pick up, and easier to maintain longterm, especially in a team environment
Those are highly subjective, and I would argue against it being easier to maintain. When all your elements use dozens of utility classes, how do you ensure that the styles are consistent throughout the app? One typo in any of the class names can cause inconsistencies that are difficult to spot in a code review.
Oh, use reusable components, I hear you say. Well, why don't you just define the CSS in the component itself then?
Or, no, you use another abstraction on top of Tailwind like daisyUI, which is an insane attempt to bring back sanity into this workflow.
> than bespoke CSS/DOM abstractions that have layers of hidden complexity.
What abstractions?? It's literally a group of rules with a descriptive name that tells you a) what the element represents in the context of the app, and b) how it looks and behaves. There are no abstractions there.
The reason the classes are "bespoke" is because every app will be different. You might want to share some common rules between apps, and we've been doing that for decades just fine. I don't see how grouping utility class names inline makes you any faster or more productive than grouping rules in CSS declarations in the same or external file, and giving them a descriptive name.
> Remember, tons of people switched from older methodologies to Tailwind and have already priced in the benefits, small as they were.
Tons of people use and swear by bloated and complicated frontend web frameworks too, so the popularity of Tailwind doesn't surprise me. I can still have the opinion that it's all wrong, which you're free to disagree with.
Strangely latest bootstrap works just fine.
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.
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.
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.
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.