Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Create a "disabled" Mixin #97

Open
chris-pearce opened this issue Dec 19, 2016 · 0 comments
Open

Create a "disabled" Mixin #97

chris-pearce opened this issue Dec 19, 2016 · 0 comments

Comments

@chris-pearce
Copy link
Contributor

chris-pearce commented Dec 19, 2016

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant