--- a/mail/components/extensions/parent/ext-theme.js
+++ b/mail/components/extensions/parent/ext-theme.js
@@ -356,16 +356,21 @@ class Theme {
let tiling = [];
for (let i = 0, l = styles.additionalBackgrounds.length; i < l; ++i) {
tiling.push(val[i] || "no-repeat");
}
styles.backgroundsTiling = tiling.join(",");
break;
}
+ case "color_scheme":
+ case "content_color_scheme": {
+ styles[property] = val;
+ break;
+ }
default: {
if (
this.experiment &&
this.experiment.properties &&
property in this.experiment.properties
) {
styles.experimental.properties[property] = val;
} else {
--- a/mail/components/extensions/schemas/theme.json
+++ b/mail/components/extensions/schemas/theme.json
@@ -370,16 +370,36 @@
"no-repeat",
"repeat",
"repeat-x",
"repeat-y"
]
},
"maxItems": 15,
"optional": true
+ },
+ "color_scheme": {
+ "description": "If set, overrides the general 'toolbar theme'.",
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "light",
+ "dark",
+ "auto"
+ ]
+ },
+ "content_color_scheme": {
+ "description": "If set, overrides the color scheme for the content area.",
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "light",
+ "dark",
+ "auto"
+ ]
}
},
"additionalProperties": {
"type": "string"
}
}
},
"additionalProperties": {
--- a/mail/themes/addons/dark/manifest.json
+++ b/mail/themes/addons/dark/manifest.json
@@ -41,16 +41,17 @@
"button_hover": "rgb(82, 82, 94)",
"button_active": "rgb(91, 91, 102)",
"error_text_color": "rgb(255, 154, 162)",
"input_background": "#42414d",
"input_color": "#bfbfc9",
"input_border": "#8f8f9d"
},
"properties": {
+ "color_scheme": "dark",
"panel_hover": "color-mix(in srgb, currentColor 9%, transparent)",
"panel_active": "color-mix(in srgb, currentColor 14%, transparent)",
"panel_active_darker": "color-mix(in srgb, currentColor 25%, transparent)"
}
},
"theme_experiment": {
"stylesheet": "experiment.css",
--- a/mail/themes/addons/light/manifest.json
+++ b/mail/themes/addons/light/manifest.json
@@ -40,16 +40,17 @@
"sidebar_highlight": "#2292d0",
"sidebar_highlight_text": "#fff",
"sidebar_highlight_border": "#0060df",
"button": "rgba(207, 207, 216, 0.33)",
"button_hover": "rgba(207, 207, 216, 0.66)",
"button_active": "rgb(207, 207, 216)"
},
"properties": {
+ "color_scheme": "light",
"panel_hover": "color-mix(in srgb, currentColor 12%, transparent)",
"panel_active": "color-mix(in srgb, currentColor 20%, transparent)",
"panel_active_darker": "color-mix(in srgb, currentColor 27%, transparent)"
}
},
"theme_experiment": {
"stylesheet": "experiment.css",