“Favor composition over inheritance”. This piece of wisdom from
one of the most influential software engineering books, is the
foundation of utility-first CSS. It also shares many principles with
functional programming: immutability, composability, predictability,
and avoidance of side-effects. The goal behind all those fancy terms
is to write code that’s easier to maintain and to scale.
Over the last several years, the way I write CSS has transitioned
from a very "semantic" approach to something much more like what is
often called "functional CSS."
Writing CSS this way can evoke a pretty visceral
from a lot of developers, so I'd like to explain how I got to this
point and share some of the lessons and insights I've picked up
along the way.
In the evening I modified the NGINX configuration for Plurrrr to
support HTTP/2 using the above article. This resulted in a
Performance score of 100 and a Best Practices score of 100.
The low SEO score is in part caused by Plurrrr having an empty robots.txt
file. According to Lighthouse:
robots.txt is not valid Lighthouse was unable to download a robots.txt file