graycoreio/daffodil

View on GitHub
libs/design/button/src/button-theme-variants/icon.scss

Summary

Maintainability
Test Coverage
@mixin daff-icon-button-theme-variant(
    $base-color: currentColor,
    $hover-color: currentColor,
    $active-color: $hover-color
) {
    color: $base-color;

    &:hover {
        color: $hover-color;
        @if $base-color == currentColor {
            opacity: 0.8;
        }
        @else {
            opacity: 1;
        }
    }

    &:active {
        color: $active-color;
    }
}