-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor refactor to work on firefox, moving files arond
- Loading branch information
1 parent
75540e3
commit 6505d53
Showing
7 changed files
with
222 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
form[data-name="toggleForm"]{ | ||
cursor: pointer; | ||
display: block; | ||
position: absolute; | ||
top: 1rem; | ||
right: 2rem; | ||
height: 50px; | ||
width: 50px; | ||
label { | ||
background: none; | ||
cursor: pointer; | ||
display: grid; | ||
padding: unset; | ||
padding-inline: 0.15rem; | ||
padding-left: 0.15rem; | ||
padding-right: 0.15rem; | ||
place-items: center; | ||
width: inherit; | ||
height: inherit; | ||
left: unset; | ||
position: relative; | ||
z-index: 1; | ||
} | ||
|
||
label::before { | ||
content: ""; | ||
cursor: inherit; | ||
background: #fff url('../images/sun.svg') no-repeat center / cover; | ||
display: block; | ||
height: 24px; | ||
width: 24px; | ||
position: absolute; | ||
top: 50%; | ||
left: 0; | ||
transform: translate(-66%, -50%); | ||
z-index: 10; | ||
} | ||
label::after { | ||
content: ""; | ||
cursor: inherit; | ||
background: #fff url('../images/moon.svg') no-repeat center / cover; | ||
display: block; | ||
height: 24px; | ||
width: 24px; | ||
position: absolute; | ||
top: 50%; | ||
right: 0; | ||
transform: translate(66%, -50%); | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
z-index: 10; | ||
} | ||
|
||
input { | ||
cursor: inherit; | ||
left: unset; | ||
right: unset; | ||
top: unset; | ||
bottom: unset; | ||
margin: unset; | ||
padding: unset; | ||
position: relative; | ||
visibility: hidden; | ||
z-index: 9; | ||
} | ||
|
||
.theme-control { | ||
position: relative; | ||
z-index: 0; | ||
} | ||
|
||
.theme-control::before { | ||
content: ""; | ||
height: 1.1rem; | ||
width: 2rem; | ||
border-radius: 3rem; | ||
background: #000; | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
display: block; | ||
visibility:visible; | ||
z-index: 0; | ||
} | ||
|
||
|
||
.theme-control::after { | ||
border-radius: 50%; | ||
left: 0; | ||
right: 0; | ||
top: 0; | ||
bottom: 0; | ||
top: 50%; | ||
left: 50%; | ||
content: ''; | ||
background: #0071b5; | ||
width: 1rem; | ||
height: 1rem; | ||
display: block; | ||
position: absolute; | ||
transform: translate(-0.85rem, -50%); | ||
visibility: visible; | ||
-moz-transition: transform 350ms; | ||
-webkit-transition: transform 350ms; | ||
transition: transform 350ms; | ||
z-index: 0; | ||
|
||
} | ||
|
||
.theme-control:has(label > input:checked)::after { | ||
transform: translate(-0.15rem, -50%); | ||
} | ||
} | ||
|
||
body[data-theme="dark"] { | ||
background: #333; | ||
color: #fff; | ||
|
||
label::before, | ||
label::after { | ||
background-color: #333; | ||
} | ||
|
||
label::before { | ||
background: url('../images/sun-light.svg') no-repeat center center / cover; | ||
} | ||
|
||
label::after { | ||
background: url('../images/moon-light.svg') no-repeat center center / cover; | ||
} | ||
|
||
svg { | ||
path { | ||
color: #fff; | ||
} | ||
} | ||
|
||
a { | ||
color: #fff; | ||
} | ||
|
||
tt { | ||
color: #333; | ||
} | ||
|
||
#sidebar { | ||
background: #333; | ||
color: #fff; | ||
a { | ||
color: #fff; | ||
} | ||
|
||
a:hover, | ||
a:active { | ||
color: #e6e6e6; | ||
} | ||
} | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Oops, something went wrong.