| 1 |
#docsify-dark-theme-toggle { |
| 2 |
position: absolute; |
| 3 |
display: inline-block; |
| 4 |
width: 52px; |
| 5 |
height: 28px; |
| 6 |
margin-left: 2rem; |
| 7 |
margin-top: 1.5rem; |
| 8 |
left: 0; |
| 9 |
top: 0; |
| 10 |
z-index: 0; |
| 11 |
cursor: pointer; |
| 12 |
} |
| 13 |
.sidebar > .app-name { |
| 14 |
position: relative; |
| 15 |
} |
| 16 |
.app-name > #docsify-dark-theme-toggle { |
| 17 |
margin-right: 1rem; |
| 18 |
margin-top: 0; |
| 19 |
right: 0; |
| 20 |
left: unset; |
| 21 |
} |
| 22 |
#docsify-dark-theme-toggle::before, #docsify-dark-theme-toggle::after { |
| 23 |
position: absolute; |
| 24 |
top: 0.1em; |
| 25 |
font-size: 16px; |
| 26 |
transition: opacity 0.3s; |
| 27 |
} |
| 28 |
#docsify-dark-theme-toggle::before { |
| 29 |
content: "🌙"; |
| 30 |
left: 0.1em; |
| 31 |
opacity: 0; |
| 32 |
z-index: 1; |
| 33 |
} |
| 34 |
#docsify-dark-theme-toggle::after { |
| 35 |
content: "🌞"; |
| 36 |
right: 0.1em; |
| 37 |
opacity: 1; |
| 38 |
} |
| 39 |
#docsify-dark-theme-toggle > span { |
| 40 |
position: absolute; |
| 41 |
top: 0; |
| 42 |
left: 0; |
| 43 |
right: 0; |
| 44 |
bottom: 0; |
| 45 |
background-color: var(--theme-color, #42b983); |
| 46 |
border-radius: 28px; |
| 47 |
transition: background-color 0.3s; |
| 48 |
} |
| 49 |
#docsify-dark-theme-toggle > span::before { |
| 50 |
content: ""; |
| 51 |
position: absolute; |
| 52 |
height: 22px; |
| 53 |
width: 22px; |
| 54 |
left: 3px; |
| 55 |
top: 3px; |
| 56 |
z-index: 1; |
| 57 |
background-color: white; |
| 58 |
border-radius: 50%; |
| 59 |
transition: transform 0.3s; |
| 60 |
} |
| 61 |
.dark #docsify-dark-theme-toggle::after { |
| 62 |
opacity: 0; |
| 63 |
} |
| 64 |
.dark #docsify-dark-theme-toggle::before { |
| 65 |
opacity: 1; |
| 66 |
} |
| 67 |
.dark #docsify-dark-theme-toggle > span { |
| 68 |
background-color: var(--theme-color, #ea6f5a); |
| 69 |
} |
| 70 |
.dark #docsify-dark-theme-toggle > span::before { |
| 71 |
transform: translateX(24px); |
| 72 |
} |