Hacker News new | ask | show | jobs
by nateberkopec 3336 days ago
One of the reasons I've switched to a microframework (Milligram) is that the source is extremely easy to read and understand.

Compare mini.css (https://github.com/Chalarangelo/mini.css/blob/master/src/min...) to Milligram (https://github.com/milligram/milligram/blob/master/src/_Form...).

Unless you're planning on inlining your CSS in the head tag, IMO the network difference between 7kb and 20kb of CSS is just splitting hairs. I've gotten far more out of optimizing my CSS for programmer understanding than network size (though the two tend to be correlated!).

4 comments

As someone who sees CSS as a necessary evil, the simplicity and readability of Milligram really appealed to me. I tend to use Bootstrap out of habit (plus there are plenty of resources and answers out there) but as my skills improve I really can see the advantages of a minimal, tidy starting point that Milligram (and others) provides
Mini.css includes css-only dynamic behaviour, like tabs and accordions. That's not something you get with milligram.
So, we can hand-roll an SVG image in CSS, eh? Cool trick, I'll have to remember that one.

  background: url('data:image/svg+xml;utf8,<svg ...
Milligram sounds great for my blog, which i want to keep minimal.

Are there any examples of sites(gallery) of sites built with milligram? I'd like to see some real-world examples.

Not sure. My blog uses Milligram inlined into the head tag: https://www.speedshop.co/blog/