зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1917034 - Apply color-scheme after forced-color-adjust. r=firefox-style-system-reviewers,zrhoffman
It is one of the skipped-on-forced-colors properties. Differential Revision: https://phabricator.services.mozilla.com/D221768
This commit is contained in:
Родитель
42b2dc5f6b
Коммит
f299fb9ba0
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<style>
|
||||
:root {
|
||||
forced-color-adjust: none;
|
||||
}
|
||||
div {
|
||||
background-color: light-dark(beige, brown);
|
||||
color: light-dark(purple, blue);
|
||||
}
|
||||
div:first-of-type {
|
||||
color-scheme: light;
|
||||
}
|
||||
div:last-of-type {
|
||||
color-scheme: dark;
|
||||
}
|
||||
</style>
|
||||
<div>Light</div>
|
||||
<div>Dark</div>
|
|
@ -0,0 +1,16 @@
|
|||
<!doctype html>
|
||||
<style>
|
||||
div {
|
||||
background-color: light-dark(beige, brown);
|
||||
color: light-dark(purple, blue);
|
||||
forced-color-adjust: none;
|
||||
}
|
||||
div:first-of-type {
|
||||
color-scheme: light;
|
||||
}
|
||||
div:last-of-type {
|
||||
color-scheme: dark;
|
||||
}
|
||||
</style>
|
||||
<div>Light</div>
|
||||
<div>Dark</div>
|
|
@ -107,3 +107,5 @@ pref(ui.use_standins_for_native_colors,false) pref(browser.display.use_system_co
|
|||
# Forced color adjust
|
||||
pref(layout.css.forced-color-adjust.enabled,true) == backplate-force-color-adjust.html backplate-force-color-adjust-ref.html
|
||||
== transparent-textarea.html transparent-textarea-ref.html
|
||||
|
||||
== color-scheme.html color-scheme-ref.html
|
||||
|
|
|
@ -809,11 +809,11 @@ impl<'b> Cascade<'b> {
|
|||
#[cfg(feature = "gecko")]
|
||||
apply!(FontSizeAdjust);
|
||||
|
||||
apply!(ColorScheme);
|
||||
#[cfg(feature = "gecko")]
|
||||
apply!(ForcedColorAdjust);
|
||||
|
||||
// Compute the line height.
|
||||
// color-scheme needs to be after forced-color-adjust, since it's one of the "skipped in
|
||||
// forced-colors-mode" properties.
|
||||
apply!(ColorScheme);
|
||||
apply!(LineHeight);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче