mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add dark mode to user preferences
Summary: Adds initial implementation of dark mode. Preferences for dark mode are available on the account settings page. Dark mode is currently a beta feature as there are still some small bugs to squash and a few remaining UI elements to style. Test Plan: Browser tests. Reviewers: jarek Reviewed By: jarek Subscribers: paulfitz, jarek Differential Revision: https://phab.getgrist.com/D3587
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
import {beaconOpenMessage} from 'app/client/lib/helpScout';
|
||||
import {AppModel} from 'app/client/models/AppModel';
|
||||
import {colors, testId, vars} from 'app/client/ui2018/cssVars';
|
||||
import {testId, theme, vars} from 'app/client/ui2018/cssVars';
|
||||
import {icon} from 'app/client/ui2018/icons';
|
||||
import {commonUrls, shouldHideUiElement} from 'app/common/gristUrls';
|
||||
import {dom, DomContents, Observable, styled} from 'grainjs';
|
||||
@@ -83,7 +83,7 @@ export const cssTools = styled('div', `
|
||||
|
||||
export const cssSectionHeader = styled('div', `
|
||||
margin: 24px 0 8px 24px;
|
||||
color: ${colors.slate};
|
||||
color: ${theme.lightText};
|
||||
text-transform: uppercase;
|
||||
font-weight: 500;
|
||||
font-size: ${vars.xsmallFontSize};
|
||||
@@ -96,22 +96,22 @@ export const cssSectionHeader = styled('div', `
|
||||
export const cssPageEntry = styled('div', `
|
||||
margin: 0px 16px 0px 0px;
|
||||
border-radius: 0 3px 3px 0;
|
||||
color: ${colors.dark};
|
||||
--icon-color: ${colors.slate};
|
||||
color: ${theme.text};
|
||||
--icon-color: ${theme.lightText};
|
||||
cursor: default;
|
||||
|
||||
&:hover, &.weasel-popup-open, &-renaming {
|
||||
background-color: ${colors.mediumGrey};
|
||||
background-color: ${theme.pageHoverBg};
|
||||
}
|
||||
&-selected, &-selected:hover, &-selected.weasel-popup-open {
|
||||
background-color: ${colors.darkBg};
|
||||
color: ${colors.light};
|
||||
--icon-color: ${colors.light};
|
||||
background-color: ${theme.activePageBg};
|
||||
color: ${theme.activePageFg};
|
||||
--icon-color: ${theme.activePageFg};
|
||||
}
|
||||
&-disabled, &-disabled:hover, &-disabled.weasel-popup-open {
|
||||
background-color: initial;
|
||||
color: ${colors.darkGrey};
|
||||
--icon-color: ${colors.darkGrey};
|
||||
color: ${theme.disabledPageFg};
|
||||
--icon-color: ${theme.disabledPageFg};
|
||||
}
|
||||
.${cssTools.className}-collapsed > & {
|
||||
margin-right: 0;
|
||||
@@ -171,12 +171,12 @@ export const cssPageEntryMain = styled(cssPageEntry, `
|
||||
export const cssPageEntrySmall = styled(cssPageEntry, `
|
||||
flex: none;
|
||||
border-radius: 3px;
|
||||
--icon-color: ${colors.lightGreen};
|
||||
--icon-color: ${theme.controlFg};
|
||||
& > .${cssPageLink.className} {
|
||||
padding: 0 8px 0 16px;
|
||||
}
|
||||
&:hover {
|
||||
--icon-color: ${colors.darkGreen};
|
||||
--icon-color: ${theme.controlHoverFg};
|
||||
}
|
||||
.${cssTools.className}-collapsed & {
|
||||
display: none;
|
||||
|
||||
Reference in New Issue
Block a user