Update CSS Pipeline #4
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	
	No description provided.
		
		Delete branch "feat/update-css-pipeline"
	
	Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The goal of this change was to speed up my CSS pipeline. Previously builds would take up to 30s because it had to rebuild the CSS for every page (I inlined the CSS).
This updates the pipeline to remain somewhat the same, but offloads the busywork of computing my theme CSS (my design system in other words), and is replaced by a mostly static file (
css/global/lilypad.css), which I can update as my design system changes.I also offloaded several of my utility classes as I know I will want to use them in other sites I design, so it made sense to move them as well.
The new pipeline makes use of 11ty's bundle feature (newly included in 11ty v3), which allows me to bundle all my CSS together into one file. Since I know my core styles like
lilypad.csswill always remain the same, I decided to keep that inline. I use thetransformsfeature for bundling to run a PostCSS transform on the bundled output, which resolves any imports and minifies the final output.In order to cut down my build times even further, I removed my XML minifier - it was taking upwards of 3 seconds to minify XML to probably a small benefit to end users.