From 7b7d037176746a3ee5e314fff4c193baf4ec297f Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Wed, 17 Feb 2021 18:58:24 +0300 Subject: [PATCH] [dark theme] fixed themes switching --- apps/common/main/lib/controller/Themes.js | 4 ++-- apps/common/main/resources/less/colors-table-dark.less | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/common/main/lib/controller/Themes.js b/apps/common/main/lib/controller/Themes.js index 1f09cb8a1..a1ee614bb 100644 --- a/apps/common/main/lib/controller/Themes.js +++ b/apps/common/main/lib/controller/Themes.js @@ -54,10 +54,10 @@ define([ setTheme: function (name) { if ( sdk_themes_relation.contains(name) ) { var classname = document.documentElement.className.replace(/theme-\w+\s?/, ''); - document.documentElement.className = classname; + document.body.className = classname; this.api.asc_setSkin(sdk_themes_relation[name]); - $(':root').addClass(name); + $('body').addClass(name); Common.localStorage.setItem('ui-theme', name); Common.NotificationCenter.trigger('uitheme:change', name); } diff --git a/apps/common/main/resources/less/colors-table-dark.less b/apps/common/main/resources/less/colors-table-dark.less index 00c583537..c6d00ad0a 100644 --- a/apps/common/main/resources/less/colors-table-dark.less +++ b/apps/common/main/resources/less/colors-table-dark.less @@ -1,6 +1,6 @@ :root { - &.theme-dark { + .theme-dark { --toolbar-header-document: #2a2a2a; --toolbar-header-spreadsheet: #2a2a2a; --toolbar-header-presentation: #2a2a2a;