The stylesheet that now arrives with the page
A first visit to any page paid a second round trip before it could paint: the stylesheet. On a phone that was half the wait. It now travels inside the page, lightly minified, and a careful check that the minifier changed nothing — including the false alarm the check raised first.
Load the same page twice in a fresh browser on a slow connection and time the moment the biggest thing on it is painted. First time: six hundred milliseconds. Second time: three hundred. Nothing on the page changed between the two. The difference is a single request — the stylesheet — which the browser must fetch before it will paint anything, and which on the first visit it did not have.
Every first-time visitor to any page paid that. On a phone on mobile data it is a full round trip, and a round trip there is not measured in tens of milliseconds. So the stylesheet now travels inside the page. The build reads the file, minifies it lightly and writes it into every generated page as a style block where the link used to be. About five kilobytes more per page over the wire, compressed, and the page can paint the moment its own HTML has arrived. Repeat visitors pay the five kilobytes too, but five kilobytes is a few milliseconds on any connection and a round trip is not.
A minifier is a bug generator until proven otherwise
The minify is deliberately timid. Comments out, runs of whitespace to a
single space, no space around braces and semicolons — and nothing else.
Specifically, nothing around colons, because .a :hover and
.a:hover are different selectors and a minifier that cannot tell
them apart is not saving bytes, it is changing the page.
Then the proof. For five pages at two widths, every element's position and size and ten of its computed styles were recorded under the inline stylesheet, then again with the external file swapped in, and the two compared. Ten of ten identical, across nearly three thousand elements. A test now reads five generated pages and checks each carries exactly the current stylesheet inline and no link to the old one — so a page built before a stylesheet edit, or the link creeping back, fails by name.
The false alarm
The first run of that proof said two pages differed: a taller button on the sign-up page and a footer ten pixels lower on the home page. Both pages have a few styles of their own, written after the shared stylesheet. The proof had appended the external file at the end of the head — after those page styles — so the swap changed which rule won, and the difference it reported was the swap's, not the build's. Inserted in the original position, everything matched. A comparison has to change exactly one thing. That one is written down too, so the next person does not spend an hour on a button that was never wrong.