diff --git a/apps/theming/src/UserThemes.vue b/apps/theming/src/UserThemes.vue index 0f72e95d9a8fe..9f81863f307f1 100644 --- a/apps/theming/src/UserThemes.vue +++ b/apps/theming/src/UserThemes.vue @@ -242,13 +242,13 @@ export default { const enabledFontsIDs = this.fonts.filter(font => font.enabled === true).map(font => font.id) this.themes.forEach(theme => { - document.body.toggleAttribute(`data-theme-${theme.id}`, theme.enabled) + document.documentElement.toggleAttribute(`data-theme-${theme.id}`, theme.enabled) }) this.fonts.forEach(font => { - document.body.toggleAttribute(`data-theme-${font.id}`, font.enabled) + document.documentElement.toggleAttribute(`data-theme-${font.id}`, font.enabled) }) - document.body.setAttribute('data-themes', [...enabledThemesIDs, ...enabledFontsIDs].join(',')) + document.documentElement.setAttribute('data-themes', [...enabledThemesIDs, ...enabledFontsIDs].join(',')) }, /** diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index 951f0dabe21fc..09d1860b674c2 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -13,7 +13,10 @@ } ?> - + data-themes=>