diff --git a/devtools/shared/css/generated/properties-db.js b/devtools/shared/css/generated/properties-db.js index 2798d3bccbe5..5c3e90bf4ab9 100644 --- a/devtools/shared/css/generated/properties-db.js +++ b/devtools/shared/css/generated/properties-db.js @@ -5441,6 +5441,23 @@ exports.CSS_PROPERTIES = { "unset" ] }, + "color-scheme": { + "isInherited": true, + "subproperties": [ + "color-scheme" + ], + "supports": [], + "values": [ + "dark", + "inherit", + "initial", + "light", + "normal", + "only", + "revert", + "unset" + ] + }, "column-count": { "isInherited": false, "subproperties": [ diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index c7c6c03204b1..59e68529c2b0 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -6851,7 +6851,7 @@ # Whether the `color-scheme` css property and meta tags are enabled. - name: layout.css.color-scheme.enabled type: RelaxedAtomicBool - value: false + value: @EARLY_BETA_OR_EARLIER@ mirror: always rust: true diff --git a/testing/web-platform/meta/css/css-color/system-color-compute.html.ini b/testing/web-platform/meta/css/css-color/system-color-compute.html.ini index 0d1fd332c917..b6351f7ff4d5 100644 --- a/testing/web-platform/meta/css/css-color/system-color-compute.html.ini +++ b/testing/web-platform/meta/css/css-color/system-color-compute.html.ini @@ -1,7 +1,6 @@ [system-color-compute.html] - [color-scheme property affects Menu system color keyword] - expected: FAIL - + prefs: [layout.css.color-scheme.enabled:true] + bug: https://github.com/w3c/csswg-drafts/issues/6773 [Inherited system color keyword is observable on text-shadow] expected: FAIL @@ -41,3 +40,41 @@ [Inherited system color keyword is observable on stroke] expected: FAIL + [System color computes to itself on color] + expected: FAIL + + [System color computes to itself on background-color] + expected: FAIL + + [System color computes to itself on box-shadow] + expected: FAIL + + [System color computes to itself on text-shadow] + expected: FAIL + + [System color computes to itself on border-left-color] + expected: FAIL + + [System color computes to itself on border-top-color] + expected: FAIL + + [System color computes to itself on border-right-color] + expected: FAIL + + [System color computes to itself on border-bottom-color] + expected: FAIL + + [System color computes to itself on column-rule-color] + expected: FAIL + + [System color computes to itself on outline-color] + expected: FAIL + + [System color computes to itself on caret-color] + expected: FAIL + + [System color computes to itself on fill] + expected: FAIL + + [System color computes to itself on stroke] + expected: FAIL diff --git a/widget/nsXPLookAndFeel.cpp b/widget/nsXPLookAndFeel.cpp index 4d6f3e4a2f33..a064680111a8 100644 --- a/widget/nsXPLookAndFeel.cpp +++ b/widget/nsXPLookAndFeel.cpp @@ -635,6 +635,7 @@ Maybe nsXPLookAndFeel::GenericDarkColor(ColorID aID) { case ColorID::Window: // --in-content-page-background case ColorID::WindowBackground: case ColorID::Background: + case ColorID::Menu: case ColorID::TextBackground: color = kWindowBackground; break; @@ -643,6 +644,7 @@ Maybe nsXPLookAndFeel::GenericDarkColor(ColorID aID) { color = NS_RGB(35, 34, 43); break; case ColorID::Windowtext: // --in-content-page-color + case ColorID::Menutext: case ColorID::WindowForeground: case ColorID::TextForeground: case ColorID::MozDialogtext: