Remove unused CSS files related to Zen theme

This commit is contained in:
Mauro Balades
2024-08-13 18:19:30 +02:00
parent e474815d7e
commit 19ccd0760a
11 changed files with 131 additions and 10 deletions

View File

@@ -12,6 +12,7 @@
*/
const kZenThemeAccentColorPref = "zen.theme.accent-color";
const kZenThemeBorderRadiusPref = "zen.theme.border-radius";
/**
* ZenThemeModifier controls the application of theme data to the browser,
@@ -39,6 +40,7 @@ var ZenThemeModifier = {
listenForEvents() {
Services.prefs.addObserver(kZenThemeAccentColorPref, this.handleEvent.bind(this));
Services.prefs.addObserver(kZenThemeBorderRadiusPref, this.handleEvent.bind(this));
},
handleEvent(event) {
@@ -51,6 +53,12 @@ var ZenThemeModifier = {
*/
updateAllThemeBasics() {
this.updateAccentColor();
this.updateBorderRadius();
},
updateBorderRadius() {
const borderRadius = Services.prefs.getIntPref(kZenThemeBorderRadiusPref, 4);
document.documentElement.style.setProperty("--zen-border-radius", borderRadius + "px");
},
/**