Skip to content

Commit 177bb60

Browse files
committed
add theming
1 parent 606cc09 commit 177bb60

File tree

5 files changed

+36
-10
lines changed

5 files changed

+36
-10
lines changed

index.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,18 @@
1515
rel="stylesheet"
1616
href="https://unpkg.com/[email protected]/styles/ascetic.css"
1717
/></noscript>
18-
18+
1919
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
20-
<meta name="theme-color" content="#ffffff" />
20+
<meta
21+
name="theme-color"
22+
content="#e9eaeb"
23+
media="(prefers-color-scheme: light)"
24+
/>
25+
<meta
26+
name="theme-color"
27+
content="#232b32"
28+
media="(prefers-color-scheme: dark)"
29+
/>
2130
<title>Mark</title>
2231

2332
<!-- Primary Meta Tags -->

src/components/button.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ button {
1616
justify-content: center;
1717
align-items: center;
1818
padding: 8px;
19-
background: #f3f3f3;
19+
background: var(--overlay);
20+
color: var(--text);
2021
outline: black;
2122
border: 0px;
2223
border-radius: 6px;
2324
}
2425
2526
button:hover {
26-
background: #ddd;
27+
background: var(--surface);
2728
}
2829
2930
button.ghost {

src/components/menu-item.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ defineProps({
2424
padding-bottom: 8px;
2525
font-size: 12px;
2626
text-transform: uppercase;
27-
color: #333;
27+
color:var(--subtle);
2828
}
2929
3030
.item-wrapper:hover {
31-
background: #f3f3f3;
31+
background: var(--surface);
3232
}
3333
3434
.item-content {
@@ -38,7 +38,7 @@ defineProps({
3838
3939
.menu-modifier {
4040
font-size: 10px;
41-
background: #f3f3f3;
41+
background: var(--surface);
4242
border-radius: 6px;
4343
padding: 4px;
4444
}

src/components/menu.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ const state = reactive({ dropdownOpen: false });
5050
padding-top: 8px;
5151
padding-bottom: 8px;
5252
width: 30em;
53-
background: white;
53+
background: var(--overlay);
54+
color:var(--subtle);
5455
border-radius: 12px;
5556
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
5657
z-index: 20;

src/styles/index.css

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@
33

44
:root {
55
--base-spacing: 4px;
6+
--base: #e9eaeb;
7+
--overlay: #d3d5d6;
8+
--surface: #bdbfc2;
9+
--text: #030405;
10+
--subtle: #07090a;
11+
}
12+
13+
@media (prefers-color-scheme: dark) {
14+
:root {
15+
--base: #232b32;
16+
--overlay: #20272d;
17+
--surface: #1c2228;
18+
--text: white;
19+
--subtle: #e9eaeb;
20+
}
621
}
722

823
* {
@@ -11,6 +26,8 @@
1126

1227
body {
1328
font-family: "IBM Plex Sans", sans-serif;
29+
background: var(--base);
30+
color: var(--text);
1431
}
1532

1633
a {
@@ -22,8 +39,6 @@ a {
2239
line-height: 2;
2340
}
2441

25-
26-
2742
.preview-dot {
2843
height: 12px;
2944
width: 12px;

0 commit comments

Comments
 (0)