Can CSS color variables depend on each other? Help me fight off CSS preprocessors.
Arnav Bansal
Posted on November 23, 2018
Here, --dark-highlight is a brighter version of --dark. Is there a way I can set --dark-highlight to be dependent on --dark, where it automatically uses the same hue, saturation, and alpha values, but increases the lightness by 5%
:root {
--dark: hsla(209, 28%, 6%, 1);
--dark-highlight: hsla(209, 28%, 11%, 1);
}
Also, what's a good guide to the new CSS features?
💖 💪 🙅 🚩
Arnav Bansal
Posted on November 23, 2018
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
help Can CSS color variables depend on each other? Help me fight off CSS preprocessors.
November 23, 2018