You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@mixinch-color-contrast-warn($color1, $color2, $target: 3) {
$contrast: ch-color-contrast($color1, $color2);
@if ($contrast < $target) {
@warn"Contrast ratio of #{$color2} on #{$color1} is pretty bad, wanted a contrast of at least #{$target} but got just #{$contrast}";
}
}
Would have preferred to have it as a function, but functions in Sass needs to return a value and when called, needs to assign that value somewhere.
A mixin on the other hand doesn't need to have any side effects whatsoever.
The text was updated successfully, but these errors were encountered:
Perhaps omething like:
With maybe an implementation like:
Would have preferred to have it as a function, but functions in Sass needs to return a value and when called, needs to assign that value somewhere.
A mixin on the other hand doesn't need to have any side effects whatsoever.
The text was updated successfully, but these errors were encountered: