From bda372fb76068763731f41ec8812752aaac4d23d Mon Sep 17 00:00:00 2001 From: Ryan May Date: Mon, 28 Oct 2024 17:51:29 -0600 Subject: [PATCH] DOC: Update doc theme Replace default secondary color with something that better matches Unidata colors. Also remove and clean up some of the rest of the custom theming, including making dark mode work. --- docs/_static/theme-unidata.css | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/docs/_static/theme-unidata.css b/docs/_static/theme-unidata.css index 483ac5b8fe..dc5be528d5 100644 --- a/docs/_static/theme-unidata.css +++ b/docs/_static/theme-unidata.css @@ -1,6 +1,17 @@ /* Define "Unidata Blue" RGB values */ html { - --unidata-blue-rgb: 6, 119, 143; + --unidata-blue-rgb: rgb(6, 119, 143); + --unidata-teal-rgb: rgb(69, 166, 169); +} + +html[data-theme="light"] { + --pst-color-primary: var(--unidata-blue-rgb); + --pst-color-secondary: var(--unidata-teal-rgb); +} + +html[data-theme="dark"] { + --pst-color-primary: var(--unidata-blue-rgb); + --pst-color-secondary: var(--unidata-teal-rgb); } /* Header and heading font style */ @@ -10,32 +21,20 @@ html { /* Header colors */ .bd-header { - background: rgb(var(--unidata-blue-rgb)) !important; + background: var(--unidata-blue-rgb) !important; } -.theme-switch-button { - border-color: rgb(var(--unidata-blue-rgb)) !important; -} - -.bd-header .navbar-nav>.nav-item>.nav-link, +.bd-header .navbar-nav>.nav-item>.nav-link, .bd-header .dropdown-toggle, .bd-header .pst-navbar-icon, .bd-header .btn { color: #fff !important; - } - -.version-switcher__button { - border-color: #fff !important; } .search-button { padding: 0 0 0; } -.navbar-nav .dropdown-menu { - background-color: var(--pst-color-background); -} - /* Increase contrast of links in code snippets */ div[class^="highlight"] a { background-color: rgb(var(--unidata-blue-rgb), 0.2);