Skip to content

Commit 169d536

Browse files
authored
Adjust dark mode toggle position for mobile view (#7)
* Adjust dark mode toggle position for mobile view * Fix toggle into absolute position
1 parent 56b98ce commit 169d536

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

_includes/head_custom.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
display: flex;
1414
align-items: center;
1515
justify-content: center;
16+
line-height: 0;
1617
background-color: rgba(128, 128, 128, 0.15);
1718
color: inherit;
1819
transition: background-color 0.2s, transform 0.2s;
@@ -29,6 +30,13 @@
2930
.theme-toggle:active {
3031
transform: scale(0.95);
3132
}
33+
@media (max-width: 50rem) {
34+
.theme-toggle {
35+
position: absolute;
36+
right: 4rem;
37+
top: 0.67rem;
38+
}
39+
}
3240
</style>
3341
<script>
3442
(function() {

0 commit comments

Comments
 (0)