Skip to content

Commit c56c188

Browse files
committed
Established ::placeholder selector style
The default `::placeholder` styles—at least in Chrome—were really close to our default color for `input` fields, and thus difficult to distinguish. Overwriting this as `$grey-lighter` resolves that ambiguity, making it clearer what's an explicit value and what's an inherited value. There's also a `::-ms-input-placeholder` vendor prefix which is _supposed_ to be used, but if that's included then none of the styles are honored. It's unclear why that is, and it seems like a potentially serious bug in how CSS is processed. But since most of our customers aren't using Edge, it's not a priority to fix. Also, I needed to use `!important`. Unfortunately, Google Chrome—at least—doesn't seem to show `::placeholder` via the debugger console, even though it shows other pseudo-elements, so it's unclear what value is taking priority over this. We certainly aren't defining `::placeholder` anywhere else in our `*.scss` implementation.
1 parent 50fe853 commit c56c188

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • OnTopic.Editor.AspNetCore/Shared/Styles/Base

OnTopic.Editor.AspNetCore/Shared/Styles/Base/_forms.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,12 @@ section.attribute input.error {
162162
&.error {
163163
color : $red;
164164
}
165+
}
166+
167+
//----------------------------------------------------------------------------------------------
168+
// PLACEHOLDERS
169+
//----------------------------------------------------------------------------------------------
170+
::placeholder,
171+
::-webkit-input-placeholder {
172+
color : $grey-lighter !important;
165173
}

0 commit comments

Comments
 (0)