Closed Bug 1728170 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 30233 - Remove !important from <select> color rules

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 30233 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/30233
Details from upstream follow.

b'Mason Freed <masonf@chromium.org>' wrote:

Remove !important from <select> color rules

These were added in [1] in response to a bug [2] that was essentially
"you can style the checked option so that it is the same color as the
other options". And while that's true, I'm not sure why that's a good
reason to outlaw changes to color/background-color entirely. As
pointed out in comment [3] there, this CSS today would cause the
same issue:

option {
background: rgb(206, 206, 206);
}

because it would match the existing :checked UA style. And because
of the !important rules, there would be no way to change the :checked
style to ensure contrast.

This was mostly attempted in [4], but that CL triggered some other
bugs, so this CL doesn't change the :focus styles at all.

[1] https://src.chromium.org/viewvc/blink?revision=179782&view=revision
[2] https://crbug.com/398417
[3] https://bugs.chromium.org/p/chromium/issues/detail?id=398417#c8
[4] https://chromium-review.googlesource.com/c/chromium/src/+/3119649

Fixed: 562990
Bug: 398417
Bug: 1244986
Change-Id: If44345137867ee16d7e94ce796c4d2d2a3799461
Reviewed-on: https://chromium-review.googlesource.com/3130583
WPT-Export-Revision: 2732d26bd952282e2295dd4a4b7b718b07c1004a

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests

Status Summary

Firefox

FAIL: 1

Chrome

FAIL: 1

Safari

FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/html/rendering/widgets/the-select-element/option-checked-styling.html: FAIL (Chrome: FAIL, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0b0c20ee5245
[wpt PR 30233] - Remove !important from <select> color rules, a=testonly
https://hg.mozilla.org/integration/autoland/rev/7e0a5264b1e6
[wpt PR 30233] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
You need to log in before you can comment on or make changes to this bug.