Skip to content

Commit

Permalink
additional light/dark mode fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
donjo committed Jun 13, 2024
1 parent e423e04 commit 1bd8ba9
Showing 1 changed file with 22 additions and 33 deletions.
55 changes: 22 additions & 33 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ html:root {
--ifm-alert-padding-horizontal: 2rem;
--ifm-color-info-dark: var(--deploy-medium);
--ifm-color-info-contrast-background: var(--deploy-lightest);
--ifm-color-emphasis-300: var(--gray-00);
--ifm-color-emphasis-300: var(--gray-000);
--ifm-menu-color-background-hover: var(--deploy-lightest);
--ifm-code-font-size: 0.875em;
--ifm-code-padding-horizontal: 0.375em;
--ifm-code-padding-vertical: 0.1875em;
--ifm-code-background: #f6f8fa; /* Matches Prism highlighting */
--ifm-code-color: #393a34;
--ifm-toc-padding-vertical: 0.5rem;
--ifm-toc-border-color: var(--gray-00);
--ifm-toc-border-color: var(--gray-000);
--ifm-color-content-secondary: var(--gray-2);
--ifm-menu-color: var(--gray-2);
--ifm-navbar-search-input-background-color: var(--white);
Expand Down Expand Up @@ -122,7 +122,7 @@ html[data-theme="dark"][data-theme="dark"] {
--ifm-color-info-contrast-background: var(--deploy-dark);
--ifm-color-content-secondary: var(--gray-0);
--ifm-menu-color-background-active: var(--runtime-dark);
--ifm-code-background: #282a36;
--ifm-code-background: var(--gray-4);
--ifm-menu-color: var(--gray-00);
--ifm-navbar-shadow-dark: 0 1px 2px 0 rgba(255, 255, 255, 0.1);
--docsearch-footer-background: var(--runtime-dark);
Expand Down Expand Up @@ -150,24 +150,30 @@ html[data-theme="dark"] .navbar {
box-shadow: var(--ifm-navbar-shadow-dark);
}

html[data-theme="dark"] .secondary-navbar {
html[data-theme="dark"]
.codeBlockTitle_node_modules-\@docusaurus-theme-classic-lib-theme-CodeBlock-Content-styles-module {
border-bottom: 1px solid var(--offblack);
font-weight: var(--ifm-font-weight-bold);
font-size: 1rem;
background-color: var(--gray-4);
}
html[data-theme="dark"]
.codeBlockLines_node_modules-\@docusaurus-theme-classic-lib-theme-CodeBlock-Content-styles-module {
background-color: var(--gray-4);
border-top-left-radius: 0;
border-top-right-radius: 0;
}

/* Multiple selectors to override defaults in light mode */

html[data-theme="light"] .secondary-navbar {
border-top: 1px solid var(--gray-000);
}

html[data-theme="light"] kbd.DocSearch-Button-Key,
html[data-theme="light"] kbd.DocSearch-Commands-Key {
box-shadow: none;
color: var(--gray-3);
color: var(--gray-0);
}

html[data-theme="light"] .DocSearch-Button {
border: 1px solid var(--gray-4);
border: 1px solid var(--gray-00);
background-color: var(--white);
padding: 0 1rem;
}
Expand Down Expand Up @@ -258,12 +264,6 @@ td p:last-child {
var(--ifm-navbar-padding-horizontal);
}

.secondary-navbar-content {
padding: var(--ifm-navbar-padding-vertical)
var(--ifm-navbar-padding-horizontal);
margin: 0;
}

.table-of-contents a {
line-height: 1.5;
}
Expand Down Expand Up @@ -303,7 +303,7 @@ td p:last-child {
color: var(--ifm-navbar-link-color);
font-size: 0.75rem;
text-transform: uppercase;
border-bottom: 1px solid var(--gray-00);
border-bottom: 1px solid var(--gray-000);
margin: 1rem var(--ifm-menu-link-padding-horizontal);
padding: 0.5rem 0 0.1rem 0;
}
Expand All @@ -321,7 +321,7 @@ td p:last-child {
.subsection-header {
padding: 2px 0;
margin: 5px var(--ifm-menu-link-padding-horizontal);
border-bottom: 1px solid var(--gray-00);
border-bottom: 1px solid var(--gray-000);
font-size: 0.8rem;
}

Expand All @@ -341,17 +341,6 @@ td p:last-child {
padding: 0 2px;
}

@media (max-width: 996px) {
.secondary-navbar .navbar__item {
display: block;
}
}

.secondary-navbar-content a:first-child {
margin-left: 0;
margin-right: 1rem;
}

.navbar__link {
margin-left: 10px;
margin-right: 10px;
Expand Down Expand Up @@ -381,10 +370,6 @@ td p:last-child {
font-size: 1.3rem;
}

.secondary-navbar {
background-color: var(--white);
}

.dropdown > .navbar__link:after {
border-width: 0.3em 0.3em 0;
margin-left: 0.5em;
Expand Down Expand Up @@ -612,3 +597,7 @@ kbd.DocSearch-Commands-Key {
border-bottom-color: var(--ifm-tabs-color-active-border);
color: var(--ifm-tabs-color-active);
}

.codeBlockLines_node_modules-\@docusaurus-theme-classic-lib-theme-CodeBlock-Content-styles-module {
background-color: var(--ifm-code-background);
}

0 comments on commit 1bd8ba9

Please sign in to comment.