Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed placeholder text color for more browsers #2113

Merged
merged 3 commits into from
Jul 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- Removed time from default `dateFormat` of `EuiDatePicker` ([#1820](https://github.com/elastic/eui/pull/1820))
- Fixed `EuiPopover` from catching and preventing propagation of keydown events when closed ([#2089](https://github.com/elastic/eui/pull/2089))
- Fixed padding sizes between `EuiModal` header, body, and footer ([#2088](https://github.com/elastic/eui/pull/2088))
- Fixed placeholder text color for more browsers ([#2113](https://github.com/elastic/eui/pull/2113))

## [`12.2.0`](https://github.com/elastic/eui/tree/v12.2.0)

Expand Down
15 changes: 13 additions & 2 deletions src/components/form/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
@mixin euiPlaceholderPerBrowser {
// sass-lint:disable-block no-vendor-prefixes
// Each prefix must be it's own content block
&::-webkit-input-placeholder { @content; }
&::-moz-placeholder { @content; }
&:-ms-input-placeholder { @content; }
&:-moz-placeholder { @content; }
&::placeholder { @content; }
}

@function euiFormControlGradient($color: $euiColorPrimary) {
@return linear-gradient(to top,
Expand All @@ -19,7 +28,8 @@
line-height: 1em; // fixes text alignment in IE
color: $euiTextColor;

&::placeholder {
// sass-lint:disable-block mixins-before-declarations
@include euiPlaceholderPerBrowser {
color: $euiColorDarkShade;
}
}
Expand Down Expand Up @@ -132,7 +142,8 @@
background: $euiFormBackgroundDisabledColor;
box-shadow: inset 0 0 0 1px $euiFormBorderDisabledColor;

&::placeholder {
// sass-lint:disable-block mixins-before-declarations
@include euiPlaceholderPerBrowser {
color: $euiFormControlDisabledColor;
}
}
Expand Down