mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Support forced colors media feature.
Enabled behind layout.css.forced-colors.enabled pending finalization of the spec: <https://drafts.csswg.org/mediaqueries-5/#forced-colors> Differential Revision: https://phabricator.services.mozilla.com/D87147
This commit is contained in:
parent
cf496e4727
commit
9fd3d9a5e9
2 changed files with 30 additions and 1 deletions
|
@ -224,6 +224,9 @@ fn disabled_by_pref(feature: &Atom, context: &ParserContext) -> bool {
|
|||
if *feature == atom!("-moz-touch-enabled") {
|
||||
return !static_prefs::pref!("layout.css.moz-touch-enabled.enabled");
|
||||
}
|
||||
if *feature == atom!("forced-colors") {
|
||||
return !static_prefs::pref!("layout.css.forced-colors.enabled");
|
||||
}
|
||||
// prefers-contrast is always enabled in the ua and chrome. On
|
||||
// the web it is hidden behind a preference.
|
||||
if *feature == atom!("prefers-contrast") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue