jadu / pulsar

The User Experience and Interface framework by Jadu.
https://jadu.github.io/pulsar
MIT License
24 stars 6 forks source link

Use css variables for colour declarations #1536

Closed Stanton closed 4 months ago

Stanton commented 4 months ago

This change adds a new _vars.palette-base.scss partial which takes the sass var values defined in _palette.base.scss and maps them to the new css vars. The main goal in this is to move more intent-based colour definitions which will allow easier application of themes like dark/high contrast without the need for increased specificity or the reliance on !important.

It's not possible to replace all colours, anywhere we need to manipulate the colour in sass, like lighten(), darken(), or pick_best_color() still needs to use the color() method.