-
-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: added back basic dark mode
- Loading branch information
Showing
24 changed files
with
321 additions
and
188 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
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,43 @@ | ||
$themes: ( | ||
light: ( | ||
accent: $accent--lightmode, | ||
primary: $primary--lightmode, | ||
primary-light: $primary-light--lightmode, | ||
primary-lighter: $primary-lighter--lightmode, | ||
info: $info, | ||
shadow: $shadow--lightmode, | ||
border: 1px solid $primary-lighter--lightmode | ||
), | ||
dark: ( | ||
accent: $accent--darkmode, | ||
primary: $primary--darkmode, | ||
primary-light: $primary-light--darkmode, | ||
primary-lighter: $primary-lighter--darkmode, | ||
info: $info, | ||
shadow: $shadow--darkmode, | ||
border: 1px solid $primary-lighter--darkmode | ||
), | ||
); | ||
|
||
@mixin themed() { | ||
@each $theme, $map in $themes { | ||
.theme--#{$theme} & { | ||
$theme-map: () !global; | ||
@each $key, $submap in $map { | ||
$value: map-get(map-get($themes, $theme), '#{$key}'); | ||
$theme-map: map-merge( | ||
$theme-map, | ||
( | ||
$key: $value, | ||
) | ||
) !global; | ||
} | ||
@content; | ||
$theme-map: null !global; | ||
} | ||
} | ||
} | ||
|
||
@function t($key) { | ||
@return map-get($theme-map, $key); | ||
} |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
@mixin desktop { | ||
@media screen and (min-width: 961px) { | ||
@content; | ||
|
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
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 |
---|---|---|
@@ -1,21 +1,24 @@ | ||
.alert { | ||
padding: 1rem; | ||
border-style: solid; | ||
border-color:$alert; | ||
border-radius: 0.25rem; | ||
border-width: 2px; | ||
@include themed() { | ||
border-color: t('alert'); | ||
} | ||
padding: 1rem; | ||
border-style: solid; | ||
border-radius: 0.25rem; | ||
border-width: 2px; | ||
|
||
&__indicator { | ||
background-color: $alert; | ||
display: inline-block; | ||
border-radius: 9999px; | ||
padding: 0.5rem; | ||
width: 2.5rem; | ||
height: 2.5rem; | ||
text-align: center; | ||
color: $accent; | ||
font-weight: 800; | ||
margin-right: 0.75rem; | ||
} | ||
&__indicator { | ||
@include themed() { | ||
color: t('accent'); | ||
background-color: t('alert'); | ||
} | ||
display: inline-block; | ||
border-radius: 9999px; | ||
padding: 0.5rem; | ||
width: 2.5rem; | ||
height: 2.5rem; | ||
text-align: center; | ||
font-weight: 800; | ||
margin-right: 0.75rem; | ||
} | ||
} |
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
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.page_404 { | ||
text-align: center; | ||
padding-top: 50px; | ||
} | ||
text-align: center; | ||
padding-top: 50px; | ||
} |
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
Oops, something went wrong.