15 Mar 2020
Often times when you think about minimalism on the web the first things that come to mind are black letters with white background and a few blue/purple links. But there are two aspects to consider when we talk about minimalism on the web, on one side there is the minimalist design which can range from websites like I previously described to beautiful websites carefully crafted like the one below by Panache.
And on the other side there is minimalist code/components/features
(I program in HTML). Websites that will only add what is essentially needed such as this blog, I only require text and space to write about my thoughts and opinions.
This is where I want to focus, minimalist code.
Let’s take a look at Bootstrap v4.4.1, a CSS framework that simplifies the development of a website by defining colors, typography, layouts and different components such as forms, alerts, buttons, etc. The bootstrap.min.css file which contains all this rules weights 155.8 KiB. Usually a server will compress this file before sending it to you, which ends up at 23.6 KiB transferred when you make the request and gets uncompressed on your side. One compressed CSS file alone weights more than this webpage, including HTML, CSS and image!
In this sense when you develop a website you should always take a minimalist approach. Of course you are free to add features to your website such as a comment section, related posts, categories, etc. but some things to consider:
At the end of the day, it’s far easier to just throw some libraries, CSS framework and other components to create a website than focusing on how they work and doing it yourself. But I still believe people who develop websites should consider taking a minimalist approach and spend just a little bit more time on not bloating their website.
PS. This web page, at the moment of publication, is 19.66 KB, still less than bootstrap.min.css file.