element-hq / element-hq/element-web

Replace Sass variables with CSS custom properties

Open
#21,656 15 comments 3 reactions 0 assignees View on GitHub
A-Developer-Experience A-Performance A-Themes-Custom A-Themes-Official O-Uncommon T-Enhancement Z-Labs
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Your use case

#### What would you like to do?

Replace all Sass variables with CSS custom properties.

#### Why would you like to do it?

- Improve the performance of theme switching
- Improve CSS compilation times
- See actual variable names when inspecting the page instead of hardcoded values
- Potentially simplify the custom themes implementation?

#### How would you like to achieve it?

Separate our theme files from the rest of the CSS so that they can be swapped out easily.

### Have you considered any alternatives?

Not doing this if we have a good reason to continue using preprocessor variables.

### Additional context

https://caniuse.com/css-variables

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.