CSS Discussion Forums

There's no such thing as a stupid question. Ask. Discuss. Learn.

Math on color variables?

I'm working on an existing project and when my Grunt task tries to generate .css from .scss files, it ends in an error. It points to this line:
$highlight_factor: ( $white / 5 ); https://thegadgetwire.com/tencent-gaming-buddy/

If I change that to a hex variable, Grunt ends with an error because of this line:
background-color: $cobalt + $highlight_factor; https://192168ll.onl/

I imagine this could go on and on until I rewrite a thousand lines of styling, but I want to know why this used to work and why it doesn't now. I didn't know you could perform math on hex variables (or why you would , rather than doing something like darken($color, 10%)). AnyDesk

Is this deprecated? What's the best way to get my CSS running again?

Hackr User 1 year ago
  • Whitelisted Links