Skip to content

Commit

Permalink
Fix action button disable css (#1567)
Browse files Browse the repository at this point in the history
* Darken light theme to comply with WCAG AA

* Adjust opacity on disabled

Color and/or opacity is used to delineate enabled vs disabled elements.
Both are required becaus some themes do not change color on disabled.
  • Loading branch information
MGibson1 committed Jan 25, 2021
1 parent f71bf77 commit a261697
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/popup/scss/box.scss
Expand Up @@ -378,11 +378,13 @@
&.disabled {
@include themify($themes) {
color: themed('disabledIconColor');
opacity: themed('disabledBoxOpacity');
}

&:hover {
@include themify($themes) {
color: themed('disabledIconColor');
opacity: themed('disabledBoxOpacity');
}
}
}
Expand Down
10 changes: 7 additions & 3 deletions src/popup/scss/variables.scss
Expand Up @@ -9,7 +9,8 @@ $text-color: #000000;
$border-color: #f0f0f0;
$border-color-dark: #ddd;
$list-item-hover: #fbfbfb;
$list-icon-color: #c7c7cd;
$list-icon-color: #767679;
$disabled-box-opacity: 1;
$border-radius: 3px;
$line-height-base: 1.42857143;

Expand Down Expand Up @@ -59,6 +60,7 @@ $themes: (
headerInputPlaceholderColor: lighten($brand-primary, 35%),
listItemBackgroundHoverColor: $list-item-hover,
disabledIconColor: $list-icon-color,
disabledBoxOpacity: $disabled-box-opacity,
headingColor: $gray-light,
labelColor: $gray-light,
mutedColor: $text-muted,
Expand Down Expand Up @@ -106,7 +108,8 @@ $themes: (
headerInputColor: #ffffff,
headerInputPlaceholderColor: #707070,
listItemBackgroundHoverColor: #3c3c3c,
disabledIconColor: #c7c7cd,
disabledIconColor: #cacaca,
disabledBoxOpacity: 0.5,
headingColor: #a3a3a3,
labelColor: #a3a3a3,
mutedColor: #a3a3a3,
Expand Down Expand Up @@ -154,7 +157,8 @@ $themes: (
headerInputColor: $nord2,
headerInputPlaceholderColor: $nord3,
listItemBackgroundHoverColor: $nord3,
disabledIconColor: $nord5,
disabledIconColor: $nord4,
disabledBoxOpacity: 0.5,
headingColor: $nord4,
labelColor: $nord4,
mutedColor: $nord4,
Expand Down

0 comments on commit a261697

Please sign in to comment.