I attempted to create a conditional statement in my component using Sass @if and @else. The condition I set was that if background == var(--bg-danger)
, the color should be white. However, it only returned white and did not trigger the else condition.
@mixin text-color
@if (background: var(--bg-danger))
color: var(--text-white)
@else
color: var(--text-dark)
I would appreciate any solutions or suggestions you may have. Thank you :)