@Martin-K-Kamir
Posted
Hey @artimys,
cool idea about the function. To make it work, you need to use interpolation.
Add this to your code and it will work.
@function brightBlue($opacity: null) { @if ($opacity) { @return hsl(245, 75%, 52%, $opacity); } @else { @return hsl(245, 75%, 52%); } }
:root { --bright-blue: #{brightBlue(0.5)}; }
Marked as helpful
@artimys
Posted
@Martin-K-Kamir
Thanks, it worked like a charm