Skip to content

Commit f4276ba

Browse files
committed
Don't use CSS to choose icons based on color scheme
1 parent 3ad1be4 commit f4276ba

File tree

2 files changed

+17
-23
lines changed

2 files changed

+17
-23
lines changed

index.html

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,23 @@
1414
<br>
1515
<p style="text-align: center">OpenDream is an open source recreation of the <a href="https://www.byond.com/">BYOND</a> game engine. Current major goals include running <a href="https://spacestation13.com/">Space Station 13</a> and improving the DM development experience.</p>
1616
<div id="links">
17-
<a href="https://github.com/OpenDreamProject/OpenDream/"><img id="link-GitHub" class="link-image" alt="OpenDream GitHub"></a>
18-
<a href="https://discord.gg/UScStz6hnQ"><img id="link-Discord" class="link-image" alt="OpenDream Discord Server"></a>
19-
<a href="https://ref.opendre.am/"><img id="link-ODRef" src="/assets/odref.svg" class="link-image" alt="OpenDream DM Reference"></a>
17+
<a href="https://github.com/OpenDreamProject/OpenDream/">
18+
<picture>
19+
<source media="(prefers-color-scheme: light)" srcset="/assets/GitHub_Invertocat_Dark.svg" width="64px">
20+
<source media="(prefers-color-scheme: dark)" srcset="/assets/GitHub_Invertocat_Light.svg" width="64px">
21+
<img alt="OpenDream GitHub">
22+
</picture>
23+
</a>
24+
<a href="https://discord.gg/UScStz6hnQ">
25+
<picture>
26+
<source media="(prefers-color-scheme: light)" srcset="/assets/discord-mark-black.svg" width="64px">
27+
<source media="(prefers-color-scheme: dark)" srcset="/assets/discord-mark-white.svg" width="64px">
28+
<img alt="OpenDream Discord Server">
29+
</picture>
30+
</a>
31+
<a href="https://ref.opendre.am/">
32+
<img id="link-ODRef" src="/assets/odref.svg" width="64px" alt="OpenDream DM Reference">
33+
</a>
2034
</div>
2135
</body>
2236
</html>

style.css

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,12 @@
66
body {
77
background-color: #fafafa;
88
}
9-
10-
#link-GitHub {
11-
content: url(/assets/GitHub_Invertocat_Dark.svg);
12-
}
13-
14-
#link-Discord {
15-
content: url(/assets/discord-mark-black.svg);
16-
}
179
}
1810

1911
@media (prefers-color-scheme: dark) {
2012
body {
2113
background-color: #1b1b1b;
2214
}
23-
24-
#link-GitHub {
25-
content: url(/assets/GitHub_Invertocat_Light.svg);
26-
}
27-
28-
#link-Discord {
29-
content: url(/assets/discord-mark-white.svg);
30-
}
3115
}
3216

3317
#logo {
@@ -45,10 +29,6 @@
4529
gap: 20px;
4630
}
4731

48-
.link-image {
49-
width: 64px;
50-
}
51-
5232
a:link,a:visited {
5333
text-decoration: none;
5434
}

0 commit comments

Comments
 (0)