I asked an LLM to look at the code quality. It gave me some pointers for enhancement. This is Part 2.4.
2.4 CSS Performance
Current state: 300KB single CSS file.
Optimization opportunities:
CSS minification: The CSS could be minified for production. SillyTavern loads extensions directly, but a minified version would reduce parse time.
CSS custom properties: Already using CSS variables (--rpg-bg, --rpg-accent, etc.) — good. Consider extending this pattern further to reduce theme-switching repaint costs.
I asked an LLM to look at the code quality. It gave me some pointers for enhancement. This is Part 2.4.
### 2.4 CSS Performance
Current state: 300KB single CSS file.
**Optimization opportunities:**
- CSS minification: The CSS could be minified for production. SillyTavern loads extensions directly, but a minified version would reduce parse time.
- CSS custom properties: Already using CSS variables (--rpg-bg, --rpg-accent, etc.) — good. Consider extending this pattern further to reduce theme-switching repaint costs.
ARIA
self-assigned this 2026-07-12 12:47:28 +00:00
CSS Minification — scripts/build-css.js now supports --minify flag. Pure JS minifier (no new deps) that strips comments, whitespace, and redundant characters. Reports reduction percentage. New npm script: npm run build:css:min
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I asked an LLM to look at the code quality. It gave me some pointers for enhancement. This is Part 2.4.
2.4 CSS Performance
Current state: 300KB single CSS file.
Optimization opportunities:
I'll work on this. Give me a moment to inspect the codebase and prepare the CSS optimizations.
Done, Sir. PR opened: #14
What was implemented:
CSS Minification —
scripts/build-css.jsnow supports--minifyflag. Pure JS minifier (no new deps) that strips comments, whitespace, and redundant characters. Reports reduction percentage. New npm script:npm run build:css:minExtended CSS Custom Properties — Refactored
_08_themes.css:--rpg-content-bg,--rpg-header-text-shadow,--rpg-divider-bg,--rpg-thoughts-bg, etc.)[data-theme]selectors — children inherit automaticallyResults:
style.css: 305.4 KB → 293.9 KB (3.8% from refactoring alone)