mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
ec157dc469
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
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
import {theme, vars} from 'app/client/ui2018/cssVars';
|
|
import {styled} from 'grainjs';
|
|
|
|
// Import popweasel so that the styles we define here are included later in CSS, and take priority
|
|
// over popweasel styles, when used together.
|
|
import 'popweasel';
|
|
|
|
/**
|
|
* Style for a select dropdown button.
|
|
*
|
|
* This incorporates styling from popweasel's select, so that it can be used to style buttons that
|
|
* don't use it.
|
|
*/
|
|
export const cssSelectBtn = styled('div', `
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
width: 100%;
|
|
height: 30px;
|
|
line-height: 16px;
|
|
background-color: ${theme.selectButtonBg};
|
|
color: ${theme.selectButtonFg};
|
|
--icon-color: ${theme.selectButtonFg};
|
|
font-size: ${vars.mediumFontSize};
|
|
padding: 5px;
|
|
border: 1px solid ${theme.selectButtonBorder};
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
-webkit-appearance: none;
|
|
-moz-appearance: none;
|
|
user-select: none;
|
|
-moz-user-select: none;
|
|
outline: none;
|
|
|
|
&:focus {
|
|
outline: none;
|
|
box-shadow: 0px 0px 2px 2px #5E9ED6;
|
|
}
|
|
|
|
&.disabled {
|
|
--icon-color: ${theme.selectButtonDisabledFg};
|
|
color: ${theme.selectButtonDisabledFg};
|
|
cursor: pointer;
|
|
}
|
|
`);
|