style: Enable forced-colors in UA and chrome always

Differential Revision: https://phabricator.services.mozilla.com/D112069
This commit is contained in:
Oriol Brufau 2023-05-16 23:21:07 +02:00
parent b5dcb5c961
commit 7425f2d922

View file

@ -221,7 +221,11 @@ fn disabled_by_pref(feature: &Atom, context: &ParserContext) -> bool {
#[cfg(feature = "gecko")]
{
if *feature == atom!("forced-colors") {
return !static_prefs::pref!("layout.css.forced-colors.enabled");
// forced-colors is always enabled in the ua and chrome. On
// the web it is hidden behind a preference, which is defaulted
// to 'true' as of bug 1659511.
return !context.in_ua_or_chrome_sheet() &&
!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.