What is CSS Minification?
CSS minification is the process of removing all unnecessary characters from CSS code to reduce file size without affecting how the browser interprets and applies styles. This means stripping whitespace, removing comments, eliminating semicolons after the last declaration in a rule block, shortening color values, collapsing shorthand properties, and merging duplicate selectors. A well-written CSS file is formatted for human readability -- indented declarations, blank lines between rule blocks, descriptive comments about layout decisions. A minified CSS file is formatted for machines -- every byte serves a purpose, and anything the browser does not need for parsing is gone.
CSS files have grown substantially over the past decade. Modern design systems, utility-first frameworks like Tailwind, and CSS-in-JS solutions can generate stylesheets that run into hundreds of kilobytes before minification. A site using Bootstrap's full CSS clocks in at around 230 KB unminified. After minification, that drops to roughly 190 KB. After gzip compression on top of that, the transfer size falls to about 25 KB. Each step in this chain -- minification then compression -- targets a different type of redundancy. Minification removes syntactic waste. Compression removes statistical redundancy in the remaining bytes. Skipping minification means the compressor has to work harder on a larger input, and the result is always bigger than minified-then-compressed.
CSS minification is particularly important because CSS is a render-blocking resource. The browser cannot paint anything on screen until it has downloaded and parsed all critical CSS. Every kilobyte of CSS in the critical rendering path directly delays the first paint. This is different from JavaScript, which can be loaded with defer or async attributes. There is no equivalent for CSS -- if a stylesheet is linked in the head, it blocks rendering. Period. Minification reduces the transfer size, which reduces download time, which reduces time to first paint. On mobile networks with high latency, this can make a visible difference in how quickly users see content.