CSS module name generation & CSS pruning #675
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
applies various fixes, optimization, and cleanup ahead of sass migration. this reduces the size of the compiled
ironsworn.css
by ~45% (!).before:
after:
write a function to programmatically generate pretty CSS module class names
${kebabCase(componentFilename)}__${kebabCase(class)}
font-icon__wrapper
normalizes several CSS module class names to match migrate from LESS to SCSS (via PostCSS) #567 , and to make the generated class names more concise
minify rendered CSS via CSS nano
replace autoprefixer with
postcss-preset-env
, which includes autoprefixer (and offers more detailed configuration)reconfigure browserslist: our previous browserlist was actually much more lenient than even the general-purpose defaults provided by browserslist, so we were generating CSS for browsers that don't even support our compiled JS
work out fix for CSS bloat. running vite in library mode inlines images as base64, regardless of the configured size. yikes.
referencing svg sprites doesn't work... at least in currently available browsers. sigh.just appear once?appear only as URLs.Update CHANGELOG.md