210 points by prafandy 3 days ago | 38 comments | View on ycombinator
kyledrake 3 days ago |
metalliqaz 3 days ago |
edoceo 3 days ago |
skrtskrt 3 days ago |
I started trying to learn how to do this by following tutorials and a copying a lot of big websites that had visually attractive designs and in the end every single one is actually full of bugs, has no accessibility, or requires a brittle pile of 12+ different CSS directives that collapse if they're not all put together perfectly.
Through looking at these big sites, I have realized a lot of them write two completely different nav bars and just hide one when you swap to a mobile view. This helps a bit, but the fixed/absolute positioning crap you have to do to float things for the mobile-style menus is still hideous heap of hacks.
momojo 3 days ago |
slopinthebag 3 days ago |
prafandy 3 days ago |
This started in 2018 as the stylesheet I kept copying between client projects. Most were server-rendered apps, and every one ended up loading a JS library just to open a dropdown or a modal.
Browsers caught up. <dialog> with commandfor, popover and :has() now do most of that natively, so this year I rebuilt the kit around them. The link is one HTML file, an invoicing screen, with only the stylesheet and no script. Menus, the dialog, the drawer, tabs, tooltips and the toast all work. Turn JavaScript off and try it, then view the source.
It isn't classless like Pico (sad to see Pico stop). You write classes on a fixed scale, so page 30 still matches page 1.
That fixed scale is also why it works well with AI. The quickest way to try it on your own project: tell your AI "Build a settings page for my app with Alloy CSS. Read alloyhtml.com/llms.txt first." Then run npx @alloyhtml/css check on what it wrote, and it lists any class the kit doesn't have.
And yes, I used Claude a lot this year for the grind: stripping out JavaScript, the dark themes, the test suite. Happy to talk about how that went.
MIT, about 24 KB gzipped, from jsDelivr or npm. Dialogs need Chrome 135, Firefox 144 or Safari 26.2; the rest works a bit further back.
I also sell page templates built on it, which pays for the time, but the CSS is what this post is about. Tell me where it breaks.
Kuyawa 3 days ago |
If you use a framework, JS is not the issue, you are. But if you try to remove the web parts needed to make something simple and useful you end up with a soup of hacks that benefit nobody, specially the psychopath maintainer of your mess
HTML, CSS and JS have their exact place in the web stack
MykhailoSailor 2 days ago |
gounscrambler 2 days ago |
mmwon 3 days ago |
etatester 3 days ago |
I guess that now that code is free you can turn it into a skill and hope for the best; but the moment you need more complexity you're going to build Rube Goldberg machines.
alwinaugustin 3 days ago |
Just read this article this morning which I think highlights the problem: https://www.newsweek.com/cyber-attack-websites-affected-1272...
I think it's really cool that browsers are VMs that can run Doom now but I really think we need to come back and focus on the basics again: HTML as hand-editable documents you read, more interface components, accessibility tools. Not sure the Gemini protocol (https://en.wikipedia.org/wiki/Gemini_(protocol) will succeed but I understand and loved the spirit of it.