Skip to content

Commit 40cf15e

Browse files
committed
Change mode-toggle icon
1 parent 8dbc432 commit 40cf15e

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

_includes/mode-toggle.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
MIT License
88
-->
99

10-
<i class="mode-toggle fas fa-sun" dark-mode-invisible></i>
11-
<i class="mode-toggle fas fa-moon" light-mode-invisible></i>
10+
<i class="mode-toggle fas fa-adjust"></i>
1211

1312
<script type="text/javascript">
1413

assets/css/_addon/main.scss

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,18 @@
1212
@import "_colors/light-typography";
1313
@import "_colors/dark-typography";
1414

15-
@mixin set-visible($light-display, $dark-display) {
16-
[light-mode-invisible] {
17-
display: $light-display;
18-
}
19-
20-
[dark-mode-invisible] {
21-
display: $dark-display;
22-
}
23-
}
2415

2516
@mixin mode-toggle($dark-mode: false) {
2617
@if $dark-mode {
27-
@include set-visible(inline-block, none);
2818
@include dark-scheme;
19+
.mode-toggle {
20+
transform: rotate(180deg);
21+
}
2922
} @else {
30-
@include set-visible(none, inline-block);
3123
@include light-scheme;
24+
.mode-toggle {
25+
transform: rotate(360deg);
26+
}
3227
}
3328
}
3429

@@ -191,12 +186,16 @@ $sidebar-display: "sidebar-display";
191186
#mode-toggle-wrapper {
192187
i {
193188
@include sidebar-links;
194-
margin-right: 0;
189+
margin: 0;
195190
font-size: 1.05rem;
196191
text-align: center;
197192
position: relative;
198193
bottom: 1px;
199194
}
195+
196+
.mode-toggle {
197+
transition: all .5s !important;
198+
}
200199
}
201200

202201
.icon-border {

0 commit comments

Comments
 (0)