Commit 388f0705 authored by Brian Cui's avatar Brian Cui Committed by Commit Bot

DevTools: Fix input box placeholder color dark text on dark background

This PR fixes an issue with placeholder text in input fields showing as
black against black when the dark theme is enabled, making them
impossible to read.

The fix simply assigns the ::placeholder CSS pseudo-element to all
input fields so the placeholder text is always a shade of gray,
compatible with both themes. The color value `rgba(0, 0, 0, 0.54)` was
copied from the stylesSidebarPane rule that specified ::placeholder
color (and hence, the sidebar was not affected by this bug).

Before: https://i.imgur.com/iwiKvrU.png
After: https://i.imgur.com/labeZzz.png

The light theme appearance is unchanged.

Before (Light): https://i.imgur.com/x8sXkWU.png
After (Light): https://i.imgur.com/qp3zzzc.png


Bug: 1011477
Change-Id: Ia418ce346defb134a7a4db57b83bc666f7f49056
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1841665
Auto-Submit: Brian Cui <brcui@microsoft.com>
Reviewed-by: default avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Brian Cui <brcui@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#703406}
parent c8e5f0fc
...@@ -166,6 +166,10 @@ input { ...@@ -166,6 +166,10 @@ input {
color: inherit; color: inherit;
} }
input::placeholder {
color: rgba(0, 0, 0, 0.54);
}
:host-context(.-theme-with-dark-background) input[type="checkbox"]:not(.-theme-preserve) { :host-context(.-theme-with-dark-background) input[type="checkbox"]:not(.-theme-preserve) {
-webkit-filter: invert(80%); -webkit-filter: invert(80%);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment