Skip to content

Commit 4ae87e1

Browse files
committed
feat: add dark style
1 parent 2e5bdb9 commit 4ae87e1

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

‎sass/_body.scss‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
1+
@use 'variables' as *;
2+
3+
@media (prefers-color-scheme: dark) {
4+
body {
5+
background-color: #{$dark-background-colour};
6+
color: #ffffff;
7+
}
8+
}
9+
@media (prefers-color-scheme: light) {
10+
body {
11+
background-color: #{$light-background-colour};
12+
color: #000000;
13+
}
14+
}
15+
116
body {
217
font-family: 'figtree';
318

419
h1 {
520
font-weight: 800;
621
}
22+
23+
max-width: 1000px;
24+
margin-inline: auto;
725
}

‎sass/_variables.scss‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
$dark-background-colour: hsl(279, 7%, 9%);
2+
$light-background-colour: #f2f2f3;

‎sass/style.scss‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
@use 'fonts';
2-
@use 'body';
2+
@use 'body';
3+
@use 'variables';

0 commit comments

Comments
 (0)