Skip to content

Commit 99df16a

Browse files
authored
Use a sun for light theme toggle instead of moon (#3309)
1 parent 758e185 commit 99df16a

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

lib/resources/styles.css

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,26 @@
7070
display: none;
7171
}
7272

73+
#theme-button {
74+
position: absolute;
75+
right: 30px;
76+
height: 24px;
77+
}
78+
7379
#theme-button .material-symbols-outlined {
74-
padding-top: 6px;
7580
color: var(--main-icon-color);
7681
user-select: none;
7782
cursor: pointer;
7883
}
7984

85+
.light-theme #light-theme-button {
86+
display: none;
87+
}
88+
89+
.dark-theme #dark-theme-button {
90+
display: none;
91+
}
92+
8093
/*
8194
Only show images that fit their theme using GitHub's syntax, see:
8295
https://github.blog/changelog/2021-11-24-specify-theme-context-for-images-in-markdown/
@@ -953,11 +966,6 @@ button {
953966
padding-right: 60px;
954967
}
955968

956-
#theme-button {
957-
position: absolute;
958-
right: 30px;
959-
}
960-
961969
.tt-menu {
962970
position: absolute;
963971
top: 100%;

lib/src/generator/templates.aot_renderers_for_html.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3126,9 +3126,12 @@ String _deduplicated_lib_templates_html__head_html(
31263126
<div class="toggle" id="theme-button">
31273127
<label for="theme">
31283128
<input type="checkbox" id="theme" value="light-theme">
3129-
<span class="material-symbols-outlined">
3129+
<span id="dark-theme-button" class="material-symbols-outlined">
31303130
brightness_4
31313131
</span>
3132+
<span id="light-theme-button" class="material-symbols-outlined">
3133+
brightness_5
3134+
</span>
31323135
</label>
31333136
</div>
31343137
</header>

lib/templates/html/_head.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,12 @@
6060
<div class="toggle" id="theme-button">
6161
<label for="theme">
6262
<input type="checkbox" id="theme" value="light-theme">
63-
<span class="material-symbols-outlined">
63+
<span id="dark-theme-button" class="material-symbols-outlined">
6464
brightness_4
6565
</span>
66+
<span id="light-theme-button" class="material-symbols-outlined">
67+
brightness_5
68+
</span>
6669
</label>
6770
</div>
6871
</header>

0 commit comments

Comments
 (0)