Closed Bug 1727646 Opened 3 years ago Closed 3 years ago

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

Categories

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

task

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

PR: https://github.com/web-platform-tests/wpt/pull/30185
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.

[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

Fixed: 562990
Bug: 398417
Change-Id: Ic2bf2eaebbe2d736c047e404b855acdcf9c264ba
Reviewed-on: https://chromium-review.googlesource.com/3119649
WPT-Export-Revision: c8cd7b55cba7787e4173014d24abbefed0de078f

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/bf3a46f839a6
[wpt PR 30185] - Remove !important from <select> color rules, a=testonly
https://hg.mozilla.org/integration/autoland/rev/93bea2c3c3f6
[wpt PR 30185] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
You need to log in before you can comment on or make changes to this bug.