Skip to content

Commit

Permalink
Changed support for light/dark Themeable theme switching to optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhibbitts committed Nov 9, 2022
1 parent 963a453 commit bd9e1e3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 17 deletions.
3 changes: 3 additions & 0 deletions docs/assets/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ body .docsify-pagination-container {

}

/* Dark mode colours for use with light + dark themes */
/*
@media (prefers-color-scheme: dark) {
.markdown-section .button {
Expand All @@ -329,3 +331,4 @@ body .docsify-pagination-container {
}
}
*/
38 changes: 21 additions & 17 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="assets/favicon/favicon.png">

<!-- Theme: Simple -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css">

<!-- Theme: Simple (light + dark) -->
<link rel="stylesheet" media="(prefers-color-scheme: light)"
href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css">
<link rel="stylesheet" media="(prefers-color-scheme: dark)"
href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple-dark.css">
<!-- <link rel="stylesheet" media="(prefers-color-scheme: light)"
href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css"> -->
<!-- <link rel="stylesheet" media="(prefers-color-scheme: dark)"
href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple-dark.css"> -->

<link rel="stylesheet" href="assets/css/theme.css">
<link rel="stylesheet" href="assets/css/custom.css">
Expand Down Expand Up @@ -95,19 +98,20 @@

}

@media (prefers-color-scheme: dark) {
:root {
--link-color: #89b6e9;
--navbar-root-color: #b2b4b4;
--navbar-root-color--active: #89b6e9;
--sidebar-name-color: #89b6e9;
--sidebar-nav-link-color: #b2b4b4;
--sidebar-nav-link-color--active: #89b6e9;
--sidebar-nav-link-border-color--active: #89b6e9;
--sidebar-nav-strong-color: #b2b4b4;
--pagination-title-color: #89b6e9;
}
}
// Dark mode colours for light + dark themes
// @media (prefers-color-scheme: dark) {
// :root {
// --link-color: #89b6e9;
// --navbar-root-color: #b2b4b4;
// --navbar-root-color--active: #89b6e9;
// --sidebar-name-color: #89b6e9;
// --sidebar-nav-link-color: #b2b4b4;
// --sidebar-nav-link-color--active: #89b6e9;
// --sidebar-nav-link-border-color--active: #89b6e9;
// --sidebar-nav-strong-color: #b2b4b4;
// --pagination-title-color: #89b6e9;
// }
// }
</style>

</head>
Expand Down

0 comments on commit bd9e1e3

Please sign in to comment.