Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 7 additions & 27 deletions ui/css/base-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
--width-max: 798px;
--width-max-sidepanel: 490px;
--header-height: 68px;

color-scheme: dark light;
color: light-dark(var(--brand-colors-grey-grey1000), var(--brand-colors-grey-grey050));
background-color: light-dark(var(--brand-colors-grey-grey050), var(--brand-colors-grey-grey1000));
}

html,
body {
color: var(--color-text-default);
width: 100%;
height: 100%;
margin: 0;
Expand All @@ -25,28 +28,9 @@ body {
text-rendering: optimizeLegibility;
}

html {
@include design-system.screen-sm-max {
&:not([data-theme]) {
background-color: var(--color-background-default);
}
}

/*
Until we get the user's preference from React state,
assume the user is in dark mode, because the default
theme is system preference
*/
@media (prefers-color-scheme: dark) {
&:not([data-theme]) {
color: var(--brand-colors-white);
background-color: var(--brand-colors-grey-grey900);

body {
color: var(--brand-colors-white);
}
}
}
html[data-theme] {
color: var(--color-text-default);
background-color: var(--color-background-alternative);
}

/* stylelint-disable */
Expand All @@ -55,10 +39,6 @@ html {
height: 100%;
display: flex;
flex-direction: column;

html[data-theme] & {
background: var(--color-background-alternative);
}
}
/* stylelint-enable */

Expand Down
Loading