issue-13-css-performance
main
Addresses Issue #13: Code Quality enhancement part 2.4 — CSS Performance.
scripts/build-css.js
--minify
npm run build:css:min
src/styles/_08_themes.css
[data-theme]
Closes #13
- Add CSS minification support to build script (--minify flag) - Pure JS minifier: removes comments, whitespace, redundant chars - Reports size reduction percentage - Preserves CSS custom properties, data URIs, strings - Refactor _08_themes.css: extend CSS custom properties pattern - Define theme-specific properties per theme (--rpg-content-bg, --rpg-content-box-shadow, --rpg-header-text-shadow, etc.) - Replace triple-theme selector duplication with single [data-theme] selectors — children inherit variables automatically - Reduces themes.css from 379 to ~220 lines - Reduces style.css from 305KB to 294KB (3.8% reduction) - Add build:css:min npm script for production builds - Add 9 tests for CSS build: minification, size reduction, CSS variable preservation, data URI preservation, theme refactoring
✅ No issues found — changes look consistent with the stated intent. Ready to be merged.
No dependencies set.
The note is not visible to the blocked user.
Addresses Issue #13: Code Quality enhancement part 2.4 — CSS Performance.
Changes
1. CSS Minification (
scripts/build-css.js)--minifyflag for production buildsnpm run build:css:min2. Extended CSS Custom Properties (
src/styles/_08_themes.css)[data-theme]selectors3. Results
Closes #13
- Add CSS minification support to build script (--minify flag) - Pure JS minifier: removes comments, whitespace, redundant chars - Reports size reduction percentage - Preserves CSS custom properties, data URIs, strings - Refactor _08_themes.css: extend CSS custom properties pattern - Define theme-specific properties per theme (--rpg-content-bg, --rpg-content-box-shadow, --rpg-header-text-shadow, etc.) - Replace triple-theme selector duplication with single [data-theme] selectors — children inherit variables automatically - Reduces themes.css from 379 to ~220 lines - Reduces style.css from 305KB to 294KB (3.8% reduction) - Add build:css:min npm script for production builds - Add 9 tests for CSS build: minification, size reduction, CSS variable preservation, data URI preservation, theme refactoring✅ No issues found — changes look consistent with the stated intent. Ready to be merged.