Closed Bug 1728142 Opened 3 years ago Closed 3 years ago

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

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox93 fixed)

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

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

Revert "Remove !important from <select> color rules"

This reverts commit 6fdfd916b7f4ae574ea634dbab6536080633d6f4.

Reason for revert: Seems to be causing some WebUI issues (crbug.com/1244003 and crbug.com/1244535).

Original change's description:

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/c/chromium/src/+/3119649
Reviewed-by: Joey Arhar \<jarhar@chromium.org>
Commit-Queue: Mason Freed \<masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#915641}

Bug: 398417
Change-Id: I2ade5e6b5faa164a3dce278eb5581f816f36d25c

Reviewed-on: https://chromium-review.googlesource.com/3130361
WPT-Export-Revision: a08c442967f1e153e0aa32ffc932530b3ec3a7ad

PR 30231 applied with additional changes from upstream: e55dd04bb12d36766bec2378c7cbca76313bd734
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/327987c2aabc
[wpt PR 30231] - Revert "Remove !important from <select> color rules", a=testonly
Test result changes from PR not available.
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.