-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatic dark/light colorschemes (#234)
* Automatic dark/light colorschemes A new `colorscheme` option is added with the capability to be always dark, always light, or automatic based on the user's browser setting. This makes the `inverted` option superfluous, and therefore deprecated. Nomenclature of files, variables, etc are changed from `inverted` to `dark` to reflect this change. Closes #226. * Remove inverted option completely The `inverted` option is now not just deprecated, but removed completely.
- Loading branch information
1 parent
f6caaf0
commit b00b750
Showing
14 changed files
with
167 additions
and
116 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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,49 @@ | |||
@mixin base_dark { | |||
|
|||
color: $fg-color-dark; | |||
background-color: $bg-color-dark; | |||
|
|||
a { | |||
color: $link-color-dark; | |||
} | |||
|
|||
h1, | |||
h2, | |||
h3, | |||
h4, | |||
h5, | |||
h6 { | |||
color: $alt-fg-color-dark; | |||
} | |||
|
|||
code { | |||
background-color: $alt-bg-color-dark; | |||
color: $fg-color-dark; | |||
} | |||
|
|||
pre { | |||
code { | |||
background-color: inherit; | |||
color: inherit; | |||
} | |||
} | |||
|
|||
blockquote { | |||
border-left: 2px solid $alt-bg-color-dark; | |||
} | |||
|
|||
table td, table th { | |||
border: 2px solid $alt-fg-color-dark; | |||
} | |||
|
|||
} | |||
|
|||
body.colorscheme-dark { | |||
@include base_dark() | |||
} | |||
|
|||
body.colorscheme-auto { | |||
@media (prefers-color-scheme: dark) { | |||
@include base_dark() | |||
} | |||
} |
This file was deleted.
Oops, something went wrong.
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,17 @@ | |||
@mixin footer_dark { | |||
.footer { | |||
a { | |||
color: $link-color-dark; | |||
} | |||
} | |||
} | |||
|
|||
body.colorscheme-dark { | |||
@include footer_dark() | |||
} | |||
|
|||
body.colorscheme-auto { | |||
@media (prefers-color-scheme: dark) { | |||
@include footer_dark() | |||
} | |||
} |
This file was deleted.
Oops, something went wrong.
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,54 @@ | |||
@mixin navigation_dark { | |||
|
|||
|
|||
.navigation { | |||
a, span { | |||
color: $fg-color-dark; | |||
} | |||
a { | |||
&:hover, | |||
&:focus { | |||
color: $link-color-dark; | |||
} | |||
} | |||
.navigation-list { | |||
@media only screen and (max-width : 768px) { | |||
background-color: $bg-color-dark; | |||
border-top: solid 2px $alt-bg-color-dark; | |||
border-bottom: solid 2px $alt-bg-color-dark; | |||
} | |||
.menu-separator { | |||
@media only screen and (max-width : 768px) { | |||
border-top: 2px solid $fg-color-dark; | |||
} | |||
} | |||
} | |||
#menu-toggle { | |||
@media only screen and (max-width : 768px) { | |||
&:checked + label { | |||
color: $alt-bg-color-dark; | |||
} | |||
} | |||
} | |||
.menu-button { | |||
@media only screen and (max-width : 768px) { | |||
color: $fg-color-dark; | |||
&:hover, | |||
&:focus { | |||
color: $link-color-dark; | |||
} | |||
} | |||
} | |||
} | |||
|
|||
} | |||
|
|||
body.colorscheme-dark { | |||
@include navigation_dark() | |||
} | |||
|
|||
body.colorscheme-auto { | |||
@media (prefers-color-scheme: dark) { | |||
@include navigation_dark() | |||
} | |||
} |
This file was deleted.
Oops, something went wrong.
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
@import "variables"; | |||
@import "base_dark"; | |||
@import "content_dark"; | |||
@import "navigation_dark"; | |||
@import "footer_dark"; |
This file was deleted.
Oops, something went wrong.
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