In forced-colours mode with the dark colour scheme, every Default Admin select draws Drupal’s white SVG chevron and also gets the browser’s native caret back. Two chevrons appear at the right end. The patch makes the forced-colours rule win.
-
Before
The dark-mode chevron plus the native caret, in a simulated forced-colours dark stage.
-
After
The same stage with
background-image: none: one native caret.
Why it happens
Two rules set the select’s background image. The forced-colours rule targets .form-element--type-select (specificity 0-1-0) and sets background-image: none. The dark-mode rule targets .dark-mode .form-element--type-select (0-2-0) and sets the SVG. The more specific dark-mode rule wins, so the SVG stays. The forced-colours rule also sets appearance: revert, which brings back the native caret. Both are drawn.
Before, from form--select.pcss.css:
@media (forced-colors: active) {
.form-element--type-select,
.form-element--type-select:focus,
.form-element--type-select[disabled] {
background-image: none;
appearance: revert;
}
}
.dark-mode .form-element--type-select {
background-image: url("data:image/svg+xml,…"); /* 0-2-0 */
}
After, with the added selector highlighted:
@media (forced-colors: active) {
.form-element--type-select,
.form-element--type-select:focus,
.form-element--type-select[disabled],
.dark-mode .form-element--type-select {
background-image: none;
appearance: revert;
}
}
No !important, no SVG edit and no control redesign. The patch changes the source and the compiled CSS.
What to check
- Open Before. Look at the right end of the select: Drupal’s chevron and, in browsers that paint it, the native caret.
- Open After. One native caret; no Drupal SVG.
- In a real Drupal site, turn on forced colours and the dark colour scheme. The lab reproduced it on
/admin/contentand/admin/structure/block; see the evidence. - This is a visual defect. The select’s name, options and keyboard behaviour are the same before and after.
What this demonstration is not
- The stage is a simulation of the computed styles, not the operating system’s forced-colours mode. It paints the dark state manually so the double caret is visible without changing system settings.
- The native caret is painted by the browser and cannot be counted from script. The lab evidence is the computed
background-imageplus screenshots, not a programmatic caret count. - It does not cover the extra-small region selects, RTL, focus or disabled states; the lab report does.