Skip to content

Commit 7c80f1d

Browse files
committed
Add dark mode color scheme support
1 parent a3298e2 commit 7c80f1d

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

examples/liquid-glass.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
font-size: 20px;
99
font-family: system-ui;
1010
padding: 10px;
11+
background-color: #e8e8e8;
1112
}
1213

1314
a {
@@ -17,6 +18,15 @@
1718
display: inline-block;
1819
}
1920

21+
h3 {
22+
position: sticky;
23+
top: 0;
24+
background-color: rgba(255, 255, 255, 0.9);
25+
display: inline-block;
26+
padding: 0.5em;
27+
border-radius: 0.5em;
28+
}
29+
2030
div + div {
2131
margin-top: 0.5em 0;
2232
}
@@ -28,9 +38,25 @@
2838
border: none;
2939
}
3040

41+
a {
42+
color: rgb(0, 100, 255);
43+
text-decoration: none;
44+
}
45+
3146
.mobile {
3247
color: lightgray;
3348
}
49+
50+
@media (prefers-color-scheme: dark) {
51+
body, html {
52+
background-color: #222;
53+
}
54+
55+
h3 {
56+
background-color: rgba(40, 40, 40, 0.9);
57+
color: white;
58+
}
59+
}
3460
</style>
3561
</head>
3662
<body>

0 commit comments

Comments
 (0)