Issue 1100: Modified the approach used. Instead of toggling classes we change the value of an attribute now

This commit is contained in:
Dorel Barbu 2017-03-15 21:11:43 +02:00
Родитель 4426127e49
Коммит 41dfa3a82d
2 изменённых файлов: 10 добавлений и 5 удалений

Просмотреть файл

@ -16,11 +16,17 @@ div.working-set-option-btn[style] {
/* Dark Theme Color */
/* TODO - move this to the dark theme CSS later */
#sidebar {
body[data-theme='dark-theme'] #sidebar {
background-color: black;
text-shadow: none;
}
body[data-theme='light-theme'] #sidebar {
background-color: white;
text-shadow: none;
}
#project-files-container {
padding-left: 0;
font-weight: 400;
@ -37,7 +43,7 @@ div.working-set-option-btn[style] {
li.jstree-leaf a span,
li.jstree-leaf span.extension {
font-size: 15px;
color: rgba(255,255,255,.5);
color: #2893ef;
}
li.jstree-closed > a span,
@ -88,7 +94,7 @@ li.jstree-leaf a.selected-node .extension {
li.jstree-leaf a:not(.selected-node):hover,
li.jstree-open a:first-of-type:hover,
li.jstree-closed a:first-of-type:hover {
background: rgba(255,255,255,.08);
background: rgba(45,153,97,1);
}

Просмотреть файл

@ -237,9 +237,8 @@ define(function (require, exports, module) {
return result.content;
})
.then(function (cssContent) {
$("body").toggleClass("dark", theme.dark);
styleNode.text(cssContent);
$("body").attr('data-theme',theme.name);
pending.resolve(theme);
});
});