Add a theme toggle
This commit is contained in:
parent
128e1be607
commit
a64d27b8fc
11 changed files with 278 additions and 27 deletions
|
@ -110,8 +110,6 @@
|
|||
text-align: center;
|
||||
margin: 0 auto;
|
||||
padding: 5px 10px;
|
||||
background: $light-background;
|
||||
color: $light-color-secondary;
|
||||
font-size: 0.8rem;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
|
@ -122,6 +120,21 @@
|
|||
background: $dark-background;
|
||||
color: $dark-color-secondary;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
background: $light-background;
|
||||
color: $light-color-secondary;
|
||||
}
|
||||
|
||||
[data-theme=dark] & {
|
||||
background: $dark-background;
|
||||
color: $dark-color-secondary;
|
||||
}
|
||||
|
||||
[data-theme=light] & {
|
||||
background: $light-background;
|
||||
color: $light-color-secondary;
|
||||
}
|
||||
}
|
||||
|
||||
hr {
|
||||
|
@ -151,7 +164,6 @@
|
|||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: $light-background-secondary;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
border-radius: 8px;
|
||||
|
@ -164,6 +176,18 @@
|
|||
background: $dark-background-secondary;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
background: $light-background-secondary;
|
||||
}
|
||||
|
||||
[data-theme=dark] & {
|
||||
background: $dark-background-secondary;
|
||||
}
|
||||
|
||||
[data-theme=light] & {
|
||||
background: $light-background-secondary;
|
||||
}
|
||||
|
||||
+ .button {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue