Cut the stylesheet bundle from 87 KB to 31 KB
Cut the stylesheet bundle from 87 KB to 31 KB by taking a base64
font out of it, and dropped 756 KB across 22 files that were
published on every deploy and referenced by nothing.
July 2026

Situation. The site's stylesheet bundle was 87 KB, which for a
document site with no framework is most of a page weight spent
before any content arrives. The site also published a directory of
icons on every deploy, generated once and referenced by nothing
since.

Task. The weight had to come down without the design changing, and
it had to come down for a reason that could be pointed at rather
than by general tidying.

Action. Measurement first. Two thirds of the largest stylesheet was
one base64‑encoded font — about 56 KB of text encoding about 42 KB
of font — inlined for a first‑paint benefit that a preloaded
external file gets anyway, and paid for on every page whether the
weight was needed or not. Taking it out took that file from 84 KB to
28 and the whole bundle from 87 to 31. The three font weights are
preloaded instead, and the third joined the list only when field
data showed it closing the longest critical chain rather than
because three sounded complete. Separately, an audit of what the
deploy actually published found twenty‑one generated icons and a
duplicate configuration file, 756 KB, shipped every time and
referenced from nowhere; and the site's icon file itself came down
from 145 KB to 15. A modern image format was evaluated for the brand
mark, measured, and declined — it came out larger, and the selection
mechanism picks by order rather than by size, so a modern browser
would have taken the heavier file everywhere. Two checks now hold
the line: no photograph may be displayed wider than half its source
pixels, and every illustration must be published at a size its own
pixels support at both standard and high density.

Result. The bundle is 31 KB instead of 87, 756 KB of dead assets
stopped being deployed, and each decision has a measurement attached
— including the one that went the other way, which is the more
useful record of the two.

Categories:
1Frontend Engineering	/categories/frontend/	software.engineer.company	70
1Web Development	/categories/web-development/	software.engineer.company	70
1Automation & CI/CD	/categories/automation/	software.engineer.company	70
1Performance Tuning	/categories/performance/	software.engineer.company	70
1Design Systems & UI	/categories/design-systems/	software.engineer.company	70

Services:
1Frontend Development	/services/frontend-development/	software.engineer.company	70
1Website Development & CMS	/services/web-development/	software.engineer.company	70
1Brand, Marketing & SEO	/services/brand-marketing/	software.engineer.company	70

hThis page on the web	URL:https://software.engineer.company/portfolio/cut-the-stylesheet-bundle-from-87-kb-to-31-kb/	software.engineer.company	70
