campaignmonitor / shell

Campaign Monitor's CSS library
MIT License
15 stars 4 forks source link

Create a "disabled" Mixin #97

Open chris-pearce opened 7 years ago

chris-pearce commented 7 years ago

There are styles common to when an element is in a disabled state so we should handle this via a mixin to keep things DRY, which can reside in the Shared styles section of _mixins-functions.scss.

Something like this:

@mixin disabled {
    cursor: not-allowed;
    opacity: $shell-g-opacity-disabled;
    pointer-events: none;
}

Applied like this:

&:disabled {
    @include disabled;
    […]
}

See: #96.

@DaveOrDead @davidberner FYI.