diff --git a/ui/app/styles/core/buttons.scss b/ui/app/styles/core/buttons.scss index 1ba83b729..1fc5c7a53 100644 --- a/ui/app/styles/core/buttons.scss +++ b/ui/app/styles/core/buttons.scss @@ -43,6 +43,17 @@ $button-box-shadow-standard: 0 2px 0 0 rgba($grey, 0.2); box-shadow: none; } + &.is-disabled { + opacity: 0.7; + box-shadow: none; + cursor: not-allowed; + border-color: transparent; + + &:hover { + border-color: transparent; + } + } + @each $name, $pair in $colors { $color: nth($pair, 1); $color-invert: nth($pair, 2); @@ -116,6 +127,24 @@ $button-box-shadow-standard: 0 2px 0 0 rgba($grey, 0.2); box-shadow: none; } } + + // The is-disabled styles MUST trump other modifier specificites + &.is-disabled { + background-color: $color; + border-color: darken($color, 5%); + box-shadow: none; + + &:hover, + &:active, + &:focus, + &.is-hovered, + &.is-active, + &.is-focused { + background-color: $color; + border-color: darken($color, 5%); + box-shadow: none; + } + } } } diff --git a/ui/stories/components/buttons.stories.js b/ui/stories/components/buttons.stories.js index 166214572..9c139e5b8 100644 --- a/ui/stories/components/buttons.stories.js +++ b/ui/stories/components/buttons.stories.js @@ -75,7 +75,7 @@ export let Sizes = () => { export let Disabled = () => { return { template: hbs` -
disabled attributearia-disabled="true"