I understand the "starting point" part but I find the emphasis on "classless" interesting: you basically have to introduce a non-element selector as soon as you want make even the smallest layout change.
For anything beyond a single page document, I find something like matcha.css (https://matcha.mizu.sh, you can even pick your custom build on the same page) a practical starting point if you want to stay close to the elements.
_heimdall 1 days ago [-]
I tend to start a project by making a classless stylesheet of sorts to set a baseline for the theme and branding.
Its almost never all you need for an actual project, but it is a nice starting point to get the basics in place.
I find that I look at the endless list of classless stylesheets shared online as a starting point, most have at least one or two interesting tricks worth borrowing. I don't find using the off the shelf ones particularly useful though, it ends up with a very generic look to it like the old default bootstrap site or newer default tailwind site.
nilslindemann 1 days ago [-]
With @layer this has become simpler:
/* define layer order. Not necessary here */
@layer pico, nils;
/* import framework into layer */
@import url("pico.css") layer(pico);
/* define own styles in own layer, they have precedence. CSS vars are still global. */
@layer nils {
p:first-of-type {
color: green;
}
}
thih9 2 days ago [-]
I’m surprised how few of them support dark mode.
IMHO today dark mode support is part of reasonable defaults.
etatester 2 days ago [-]
I think they're just really old and not supported by anyone.
small_scombrus 2 days ago [-]
It's honestly horrifying how many website just don't bother.
Like w3, the makers of the web accessibility checklist have a flash-bang of a website and noone appears to have cared enough to fix it
Yokohiii 2 days ago [-]
What are the reasons why you want dark mode so badly?
kdkekxjjexnek 1 days ago [-]
I think the “flash bang” comment gives you a pretty good, convincing idea of why this is sorely needed.
nottorp 1 days ago [-]
To take advantage of oled and local dimming displays, for example.
Thank you for not caring about my battery.
testerius 1 days ago [-]
Because there are different people - many of them like using dark mode.
TZubiri 2 days ago [-]
Wrote some css from scratch the other day, 7 lines and I was done, line 8 are 9 were dark mode support integrated with OS setting.
It's not that complex, there's some minimal frameworks here with 10kB of css code, it's ironic.
dantesays 1 days ago [-]
[flagged]
matthova 2 days ago [-]
Love the idea. It's really painful to cycle through every theme. Would be great to have a way to scroll through them directly, though... that would result in a bigger bundle, and I respect the hustle
I was very curious for the reason and I found it. Cssbed is not hosting css files but loading upstream css and https://vanillacss.com/vanilla.css has been hacked/hijacked, so no css is being loaded but HTML full of crap.
I thought if request origin or content-type was stylesheet no href GET should be triggered (maybe src) but looks like full HTML site is being rendered behind the scenes of a simple css request.
toymin 1 days ago [-]
Quite a few of them look off on mobile, they either have no edge margins at all or they're too large and force the user to scroll horizontally
newsy-combi 1 days ago [-]
OP frankly can't be a serious dev with results like these. It's most likely slop. This looks like a CV project to impress some HR Karens with HN/github clout, to land a job as an AI meat proxy...
testerius 1 days ago [-]
I have not written any CSS from scratch since years. Does normalize.css/reset.css are still viable and used? I use Tailwind because of components design, so I wonder what actually current trends are in context of small/alternative CSS solutions.
drewbitt 1 days ago [-]
Resets are still viable. They've become shorter over the years as css has advanced. Obviously if you write Tailwind you don't need a reset.
For small/alternative stuff, since nesting/has()/ field sizing and such is native now there's not much to do there, so what's mostly relevant is some classless sheets like what this article is about.
CSS in JS is also still a big thing.
nilslindemann 2 days ago [-]
For me it is definitely Pico.css. Honorable mentions: simple.css, tacit, w3c-chocolate.
We have different definitions of lightweight it seems like.
frereubu 2 days ago [-]
When I worked at the BBC in the late 90s / early 2000s the home page of any site - including images - couldn't be more than 70kb!
frereubu 1 days ago [-]
Just checked - now the homepage of the BBC on load has a transfer of 1.5MB with 5.7MB of resources, and once you've scrolled down the page for the lazy loaded images those figures are 2.9MB and 7.2MB respectively.
chrismorgan 2 days ago [-]
Well, μ- is a million times bigger than p-. But last time I looked <https://news.ycombinator.com/item?id=45163827>, Pico CSS was 83 kB—nowhere near as small as that name would suggest, either.
steezeburger 2 days ago [-]
Brb, gotta go cough up some mucss
shrikant 1 days ago [-]
I used chota.css (https://jenil.github.io/chota/) in the past to build a couple internal sites for my then-employer. Only ~3kb compressed! And the name stays relevant-ish because it means "small" in Hindi...
Edited to add: it's not classless though. Marx would disapprove.
ctippett 2 days ago [-]
holiday.css for me, only 5kb to boot.
robertclaus 2 days ago [-]
I like marx
needfish 2 days ago [-]
I had a server-side app made for personal stuff, and pico.css drop-in is a pretty good baseline for an usable UI/page. Also visited some web hosts and their sites look perfectly serviceable with Bootstrap. I think it's a good way to railroad some of the more egregious things LLMs might do with regards to CSS.
bryanhogan 1 days ago [-]
I've been building something similar which should also be used as a starting point for web development.
It includes a setup for simple plain CSS that can scale. It's split into a reset.css, var.css, global.css, util.css and markdown.css.
Interesting. Having made websites I think "of course that makes sense!". As a practical matter, getting wanted page appearance can require adding a few classes. I've been guilty of class proliferation caused by perfectionistic tweaking of things to the last nanogram. Anymore I strive not to go there.
mikae1 2 days ago [-]
Eye opener. I think I looked through almost all of them and none got basic typography right such as less margin bottom beneath a heading (to the paragraph following it) than above.
Many had zero left/right margins on mobile.
Overall terrible defaults.
dematz 1 days ago [-]
Is there any classless CSS that you do like, that looks good on mobile etc?
mikae1 1 days ago [-]
Not that I know of.
e12e 2 days ago [-]
[2019]
But might be due a revival on the shoulders of LLMs.
What does resetting inconsistent browser behavior have to do with classless styling? Those two aren't the same.
2 days ago [-]
stymaar 1 days ago [-]
I didn't know what "classless CSS" meant so I clicked the link and I like this joke:
> Classless frameworks are not just for communists. But I imagine communists would enjoy them even more.
fabiofzero 1 days ago [-]
This is great! I've been going in a similar direction with HTML3000 - https://html3000.dev
newsy-combi 1 days ago [-]
Aaaand the <pre> overflows horizontally on mobile. Tell me more about how you're a frontend dev and not a meat proxy for an AI slop machine.
boxed 2 days ago [-]
It's sad that most of these themes makes buttons not look like buttons.
ctippett 2 days ago [-]
Not only that, but very few of them differentiate between a visited link and an unvisited one. I noticed this immediately when clicking through the list of themes and getting no visual indication of which ones I'd already looked at.
thiht 2 days ago [-]
Which one? They all look like buttons to me
droidjj 1 days ago [-]
Am I the only one who prefers unstyled HTML?
real_faxenoff 1 days ago [-]
[dead]
maxk42 2 days ago [-]
I love classless CSS for rapid hand prototyping. LLMs are making this increasingly less necessary, but it's still great for creating tiny, performant CSS pages and some of the smaller ones can even be inlined in fewer bytes than it takes to make a 2nd round trip to the server to check if the asset has been updated. This is one of my secret weapons for creating web apps that load and render so fast you can feel the difference!
https://dohliam.github.io/dropin-minimal-css/
For anything beyond a single page document, I find something like matcha.css (https://matcha.mizu.sh, you can even pick your custom build on the same page) a practical starting point if you want to stay close to the elements.
Its almost never all you need for an actual project, but it is a nice starting point to get the basics in place.
I find that I look at the endless list of classless stylesheets shared online as a starting point, most have at least one or two interesting tricks worth borrowing. I don't find using the off the shelf ones particularly useful though, it ends up with a very generic look to it like the old default bootstrap site or newer default tailwind site.
IMHO today dark mode support is part of reasonable defaults.
Like w3, the makers of the web accessibility checklist have a flash-bang of a website and noone appears to have cared enough to fix it
Thank you for not caring about my battery.
It's not that complex, there's some minimal frameworks here with 10kB of css code, it's ironic.
All the others are as you'd expect.
I was very curious for the reason and I found it. Cssbed is not hosting css files but loading upstream css and https://vanillacss.com/vanilla.css has been hacked/hijacked, so no css is being loaded but HTML full of crap.
I thought if request origin or content-type was stylesheet no href GET should be triggered (maybe src) but looks like full HTML site is being rendered behind the scenes of a simple css request.
For small/alternative stuff, since nesting/has()/ field sizing and such is native now there's not much to do there, so what's mostly relevant is some classless sheets like what this article is about.
CSS in JS is also still a big thing.
We have different definitions of lightweight it seems like.
Edited to add: it's not classless though. Marx would disapprove.
It includes a setup for simple plain CSS that can scale. It's split into a reset.css, var.css, global.css, util.css and markdown.css.
Using that approach for this Astro Starter Template: https://starter.bryanhogan.com/
I describe the setup in more detail here: https://webdev.bryanhogan.com/css/css-setup/
Many had zero left/right margins on mobile.
Overall terrible defaults.
But might be due a revival on the shoulders of LLMs.
> Classless frameworks are not just for communists. But I imagine communists would enjoy them even more.