First Impressions: Milligram

Portrait Michael Lauridsen
Dec 10, 2023
3 min read

First Impressions is a series where I share my thoughts about a library, framework, or other tech after my first time working with it. It’s important to reiterate that I am not posing as an expert on whatever tech I am talking about; These are my first impression opinions after using something in at least a basic capacity.

Milligram is a minimalist CSS framework that sports an impressive gzipped size of 2kb. Much of its styling is achieved without using classes, which is nice since it removes some of your typical distractions when styling a page. It provides you with just the basics you might need to make a simple web application or website. If you are looking for components or any premade elements like nav, they don’t exist, and you should look elsewhere.

My experience with Milligram comes from a web app I made recently using Nuxt and Vue. I figured with how simple the application is, this would be a good fit for the project, but I found myself thinking I had chosen the wrong framework. I also ended up bringing Tailwind in to fill in what was missing.

What I liked

  • The general styling of Milligram is simple but pleasing
  • Not needing to use classes for everything was enjoyable
  • While not documented, you can make use of SASS to include only the parts you want

What I didn’t like

  • Utility classes were very lacking (just floats)
  • The included grid system is extremely basic, lacking classes to control how columns behave at different breakpoints
  • Documentation is basic, with just one page, and lacks instructions on how to customize aspects of the framework

Would I use it again?

Unfortunately, no. Part of that answer is simply knowing that there are other options out there I think will be better, and the other part is that I wasn’t satisfied with Milligram. On top of that, the project hasn’t had an update in 3 years. I appreciate Milligram’s simplicity, but like anything, it’s a trade-off, and you have to decide if losing the convenience of other frameworks to trim a few kb off of the served stylesheets is worth it.

If you do decide to use Milligram, keep in mind that it won’t provide much, and you will have to make up for the rest yourself or bring in other frameworks like Tailwind to supplement the gaps. However, given its inactivity, I would recommend against using it.

Portrait

Michael Lauridsen
Michael is a Senior Full Stack Engineer with over ten years of professional experience designing and developing end-to-end applications for the web. He has successfully architected and deployed over a dozen applications throughout his career.

Comments