Skip to content

Commit

Permalink
fix(select): Disabled color and opacity (#3513)
Browse files Browse the repository at this point in the history
* Sets disabled `color` directly instead of giving the entire `mdc-select` element `opacity: .38` and relying on the default browser styles for text color.

![image](https://user-images.githubusercontent.com/409245/45083325-5c0eb300-b0b0-11e8-8917-957bc0306937.png)

![image](https://user-images.githubusercontent.com/409245/45083330-616bfd80-b0b0-11e8-8817-8e96cb59006f.png)
  • Loading branch information
acdvorak authored and williamernest committed Sep 11, 2018
1 parent 425df03 commit 8b10c02
Show file tree
Hide file tree
Showing 2 changed files with 148 additions and 61 deletions.
8 changes: 7 additions & 1 deletion packages/mdc-select/mdc-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@
text-indent: -2px;
}

// stylelint-disable-next-line selector-max-type, plugin/selector-bem-pattern
> option {
color: inherit; // Override default user agent stylesheet
}

width: 100%;
padding-top: 20px;
padding-bottom: 4px;
Expand All @@ -79,6 +84,7 @@
border-radius: 0;
outline: none;
background-color: transparent;
color: inherit; // Override default user agent stylesheet
white-space: nowrap;
cursor: pointer;
appearance: none;
Expand Down Expand Up @@ -186,6 +192,7 @@

.mdc-select__native-control {
border-bottom-style: dotted;
color: $mdc-select-disabled-ink-color;
}
// stylelint-enable plugin/selector-bem-pattern

Expand All @@ -202,7 +209,6 @@
@include mdc-select-outline-color_($mdc-select-outlined-disabled-border);
}

opacity: .38;
cursor: default;
pointer-events: none;
}
Loading

0 comments on commit 8b10c02

Please sign in to comment.