Commit 629acd0e authored by Dominic Mazzoni's avatar Dominic Mazzoni Committed by Chromium LUCI CQ

Fix NTP realbox dropdown in Forced-colors mode

The box-shadow property isn't shown in forced colors mode,
so give the realbox dropdown a real border instead.

In addition, the color used to highlight a dropdown item
when focused or hovered is ignored in forced-colors mode,
so set it to specific system colors that are respected
in that mode.

See bug for before/after screenshots.

Bug: 1166383
Change-Id: I537cd4dcf7be8b9539517cc9783295a29519f55a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2627820Reviewed-by: default avatarEsmael Elmoslimany <aee@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843700}
parent 92bb9496
...@@ -14,6 +14,12 @@ ...@@ -14,6 +14,12 @@
padding-top: var(--ntp-realbox-height); padding-top: var(--ntp-realbox-height);
} }
@media (forced-colors: active) {
#selector {
border: 1px solid ActiveBorder;
}
}
ntp-realbox-match { ntp-realbox-match {
color: var(--search-box-results-text); color: var(--search-box-results-text);
} }
...@@ -68,6 +74,17 @@ ...@@ -68,6 +74,17 @@
background-color: var(--search-box-results-bg-selected, rgba(var(--google-grey-900-rgb), .16)); background-color: var(--search-box-results-bg-selected, rgba(var(--google-grey-900-rgb), .16));
color: var(--search-box-results-text-selected, var(--google-grey-900)); color: var(--search-box-results-text-selected, var(--google-grey-900));
} }
@media (forced-colors: active) {
ntp-realbox-match:hover,
.header:hover {
background-color: Highlight;
}
ntp-realbox-match:-webkit-any(:focus-within, .selected),
.header:focus-within:not(:focus) {
background-color: Highlight;
}
}
</style> </style>
<iron-selector id="selector" selectable="ntp-realbox-match" <iron-selector id="selector" selectable="ntp-realbox-match"
items="{{selectableMatchElements_}}" selected="{{selectedMatchIndex}}" items="{{selectableMatchElements_}}" selected="{{selectedMatchIndex}}"
......
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