Revisiting "simple": inlined CSS edition

Published 2026-02-16

tag(s): #programming #random-thoughts #meta

On his post Why I inlined my CSS in 11ty, ldstephens explains that he achieved faster page loads and an easier deployment process. His post was interesting in a couple ways.

As it is known, the content you are reading now is hand-typed HTML. I didn't feel like learning, and then be tied, to one or another tool. Be it a static site generator or something fancier.[1]
As a consequence of that early decision...

The last point matches ldstephens experience, no need to deal with expiring your cached CSS: each post lives independently of the rest of the site.
Another interesting consequence is that I could easily make a page have completely different styles, without configuring or changing anything global. And at first, I did have something like that, only "photo" posts had styling for img tags. But as all developers know, there's a value in standardizing. And in some round of major style change[2], I homogenized it all.

As all developers also know, there's a "stiffness" that comes with templating too much. There's a balance to be had. How much to err on what side of the equation comes down the the specifics of your code base and requirements.
I don't think it should matter for this site, ever, but I like that I can manipulate a specific page if I feel the need.

The other part that was interesting from the post, and it made me laugh, is that during a call with Wouter recently, I used a CSS change in my site as an example of multi-file search and replace operations, using only Emacs built in packages.
And Wouter didn't approve of having inlined CSS everywhere, out of principle.
To be honest, I see his point. I like the simplicity of not dealing with links to the CSS, and invalidating when there's a new version. But as discussed previously in this space, simple is hard to define. You could argue that having a centralized CSS file is as simple as it gets.
It doesn't allow for unique styling per post, but that can be overridden for that single HTML file anyway? If it comes to that? So he kinda made me see that it is "more correct" to have an external file, linked in all posts, and then I see evidence to the contrary!!! What should I do!?!?!?!?!!

For the time being, nothing, because I am distracted and entertained with other things right now. But I am leaning on still going ahead with an external style sheet. For starters, I find the cache argument a bit spurious, you can just version-name your files and the problem takes care of it itself in even the most basic web server configurations.
The speed thing can be argued, although after seeing ldstephens site, and my own...does it matter? Both sites load within a second. Just like with standardizing, you need a balance. Never optimizing isn't good, but how does it benefit your users to make page loading faster than a single second? At that point the "real" page load time depends as much on their hardware as it does on the network not having a bad blip. I think we have taken it far enough by then. Any of the websites that have anti-bot challenges (and there are more every day) take comparatively ages to load.

Conclusion: Do the things The Right Way™️. No, not that right way, the other. The one that is more correct. Not that correct, the other.
OK, I will just spell it, for me, giving my circumstances and goals, I think the right move if to stop inlining CSS. To make things simpler and faster.
What do I mean by "simpler" and "faster"?
It doesn't matter. Gotta go! 🤡

Footnotes
  1. Back when I started the site though, the only thing I could publish in Fastmail was static files.
  2. Major style change, in the context of this site, it's not saying much...

Share your thoughts (via email)

Back to top

Back to homepage