Skip to content

Commit

Permalink
template: styles: Change colors for dark mode
Browse files Browse the repository at this point in the history
Change background and font colors for dark mode, both for the slide
itself and for the bottom-panel.
The idea behind changing black into very dark grey and white into very
light grey is to make the dark mode easier on the eyes, so it is
actually a valid option when presenting.
The bottom-panel text color is made always black because white on yellow is
hard to read.

Signed-off-by: Patrick Barsanti <[email protected]>
  • Loading branch information
patriickoo authored and panicking committed Jul 15, 2024
1 parent 1138b94 commit 1d61354
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion template/styles/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
--slidev-code-line-height: 14px;
}

html.dark {
.slidev-layout {
color: #cdcdcd;
background: #1e1e1e;
}
}

.left-image {
vertical-align: middle;
width: 450px;
Expand Down Expand Up @@ -87,14 +94,15 @@ ul,li {
padding-right: 16px;
padding-left: 16px;
font-size: 12px;
color: black;
background-color: #fdcb0b;
th {
font-weight: 400;
}
}

.slidev-layout.section {
background-color: black;
background-color: #1e1e1e;
text-align: end;
align-items: center;

Expand Down

0 comments on commit 1d61354

Please sign in to comment.