Can I use custom CSS properties with LESS functions?

I would like to use the slower LESS function with CSS custom property. I had something like this:

:root {
  --color-primary: green;
}

div {
  background-color: darken(var(--color-primary), 50%);
}

But that gives me an error. Is there any other way to do this?

+4
source share

Source: https://habr.com/ru/post/1680177/


All Articles