Skip to content

feat: use css custom properties for theme color customization#550

Open
lekhmanrus wants to merge 1 commit intoCodeByZach:masterfrom
lekhmanrus:feat/css-custom-properties
Open

feat: use css custom properties for theme color customization#550
lekhmanrus wants to merge 1 commit intoCodeByZach:masterfrom
lekhmanrus:feat/css-custom-properties

Conversation

@lekhmanrus
Copy link

Replace hardcoded color values in all compiled theme files with CSS custom properties using var(--pace-color, <original-color>). This enables color customization via CSS:

  :root {
    --pace-color: #ff6600;
  }

Benefits:

  • No breaking changes - default colors remain identical via fallback
  • Works when included as static CSS in frameworks
  • Eliminates the need to copy theme files locally for color changes
  • Templates (*.tmpl.css) are unchanged for JS runtime customization

Replace hardcoded color values in all compiled theme files with
CSS custom properties using `var(--pace-color, <original-color>)`.
This enables color customization via CSS:
```css
  :root {
    --pace-color: #ff6600;
  }
```
Benefits:
- No breaking changes - default colors remain identical via fallback
- Works when included as static CSS in frameworks
- Eliminates the need to copy theme files locally for color changes
- Templates (`*.tmpl.css`) are unchanged for JS runtime customization

Signed-off-by: Ruslan Lekhman <lekhman112@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant