CSS Optimization
August 19, 2025
I took a closer look at the blog's CSS today and noticed it had accumulated
quite a bit of unused code over time. There were several classes like
.highlight
and .responsive-image
that weren't actually being used anywhere,
along with styles for HTML elements like abbr
and dt
that don't appear in
any of the posts or templates.
After carefully going through and removing the unused bits, I found there were also some redundant font-family declarations scattered throughout — the same font was being specified multiple times when it only needed to be set once. I also spotted some performance-related CSS properties that seemed unnecessary for a simple static blog.
The cleanup managed to reduce the stylesheet from about 5KB down to 3.7KB, which is roughly a 27% reduction. Nothing looks different on the actual site, which was the goal — just cleaner code behind the scenes.
It's interesting how CSS can grow like this in any project that evolves over time. Features get added and refined, but the old styles often stick around even when they're no longer needed. Probably worth doing this kind of review more regularly to keep things tidy.
Recent Entries
- Bleaklow by The Stranger August 20, 2025
- The Rise of Agents in Agentic Coding August 20, 2025
- Bleu de Chanel L'Exclusif August 19, 2025