Skip to content

Commit

Permalink
Gray out labels when disabled (#648)
Browse files Browse the repository at this point in the history
* Gray out labels when disabled

* Updated changelog
  • Loading branch information
bevacqua authored Apr 10, 2018
1 parent 69f7c07 commit bce21cf
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Tweaked sizing, weights, color, line-heights, and added more levels to `EuiTitle` and `EuiText` ([#627](https://github.com/elastic/eui/pull/627))
- Add TypeScript type defitions for `EuiPortal`, `EuiText` and `EuiTitle` as well as the `calculatePopoverPosition` service ([#638](https://github.com/elastic/eui/pull/638))
- Grayed out labels for `disabled` controls ([#648])(https://github.com/elastic/eui/pull/648)

**Bug fixes**

Expand Down
5 changes: 5 additions & 0 deletions src/components/form/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@
cursor: not-allowed;
background: darken($euiColorLightestShade, 2%);
box-shadow: 0 0 0 1px transparentize($euiColorFullShade, .92);
color: $euiColorMediumShade;

&::placeholder {
color: $euiColorMediumShade;
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/components/form/checkbox/_checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
cursor: not-allowed !important;

~ .euiCheckbox__label {
color: $euiColorDarkShade;
color: $euiColorMediumShade;
cursor: not-allowed !important;
}

Expand Down
3 changes: 3 additions & 0 deletions src/components/form/file_picker/_file_picker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
&:hover:disabled {
cursor: not-allowed;
}
&:disabled ~ .euiFilePicker__prompt {
color: $euiColorMediumShade;
}
}

.euiFilePicker__icon {
Expand Down
2 changes: 1 addition & 1 deletion src/components/form/radio/_radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
cursor: not-allowed !important;

~ .euiRadio__label {
color: $euiColorDarkShade;
color: $euiColorMediumShade;
cursor: not-allowed !important;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/form/switch/_switch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
}

+ label {
color: $euiColorDarkShade;
color: $euiColorMediumShade;
}
}

Expand Down

0 comments on commit bce21cf

Please sign in to comment.