From 82b481a324102145a9b78f9335f9293d05090e17 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 7 Dec 2023 13:09:52 -0600 Subject: [PATCH 1/6] Revert "Disable dark mode temporarily" This reverts commit a85637404e6c80d808cd93271b8dbbe346f41761. --- config.yaml.in | 1 - 1 file changed, 1 deletion(-) diff --git a/config.yaml.in b/config.yaml.in index 56483f32f5..f18677d97f 100644 --- a/config.yaml.in +++ b/config.yaml.in @@ -14,7 +14,6 @@ markup: disableLanguages: [] params: - colorScheme: light author: name: "NumPy team" images: From a5cb5e40510eb221090d1cf9d665bb5313c5bb8b Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 7 Dec 2023 13:32:55 -0600 Subject: [PATCH 2/6] Fix: (.scientific-domains ... img) Invert for dark-mode --- assets/css/tabs.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/css/tabs.scss b/assets/css/tabs.scss index c1b84be604..4483b5ef17 100644 --- a/assets/css/tabs.scss +++ b/assets/css/tabs.scss @@ -109,6 +109,10 @@ section.scientific-domains { width: 50px; height: 50px; margin-bottom: 0.5em; + + html[data-theme=dark] & { + filter: invert(1) grayscale(1) !important; + } } & ul { align-content: left; From 2d96ad81a7952f54de1f1397ef79ea03eddaeec3 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 7 Dec 2023 13:57:10 -0600 Subject: [PATCH 3/6] Fix: (img.first-column-layout) Invert "Array libraries" logos This is a simple way to make them "presentable" in dark mode. Otherwise, we'd need to keep their backgrounds white (which would clash with the dark background), or edit each one individually and swap them for dark mode, which would be more complicated. --- assets/css/tabs.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/css/tabs.scss b/assets/css/tabs.scss index 4483b5ef17..b57639fedc 100644 --- a/assets/css/tabs.scss +++ b/assets/css/tabs.scss @@ -133,6 +133,10 @@ img.first-column-layout { max-width: 100px; max-height: 30px; margin: 0px 20px 0px 10px; + + html[data-theme=dark] & { + filter: invert(1) !important; + } } td.left-text { From f8005fe84cb0e019a5f3e59dc5e0995334232cfa Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 7 Dec 2023 14:08:35 -0600 Subject: [PATCH 4/6] Change/Fix: Invert all tabs' images for dark mode This seems to look good, and it avoids the clash of having some bright white, light-mode images when using dark-mode. Since all of these images are illustrations and diagrams, not photographs, it seems good. --- assets/css/tabs.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/css/tabs.scss b/assets/css/tabs.scss index b57639fedc..2a20a8cbb6 100644 --- a/assets/css/tabs.scss +++ b/assets/css/tabs.scss @@ -13,6 +13,10 @@ table td, table th { .tabs-section { display: flex; flex-direction: column; + + html[data-theme=dark] & img { + filter: invert(1) !important; + } } .tabs-section .container { @@ -133,10 +137,6 @@ img.first-column-layout { max-width: 100px; max-height: 30px; margin: 0px 20px 0px 10px; - - html[data-theme=dark] & { - filter: invert(1) !important; - } } td.left-text { From 7621707a217c96272ed9d18b35ea4f22732ef07e Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 7 Dec 2023 14:23:31 -0600 Subject: [PATCH 5/6] Fix: Remove stray LI bullet --- assets/css/tabs.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/css/tabs.scss b/assets/css/tabs.scss index 2a20a8cbb6..59c62d4b52 100644 --- a/assets/css/tabs.scss +++ b/assets/css/tabs.scss @@ -17,6 +17,10 @@ table td, table th { html[data-theme=dark] & img { filter: invert(1) !important; } + + & .tabs div li { + display: inline; + } } .tabs-section .container { From 1a9fe8d0fad0b9fd24b6bb10084036e20bc33924 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 7 Dec 2023 14:29:21 -0600 Subject: [PATCH 6/6] Fix: Tabs' contents' top margin Before this change, the images in the div.grid-container were displayed about one line higher than the text in the adjacent paragraph. --- assets/css/tabs.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/assets/css/tabs.scss b/assets/css/tabs.scss index 59c62d4b52..be95428599 100644 --- a/assets/css/tabs.scss +++ b/assets/css/tabs.scss @@ -20,6 +20,14 @@ table td, table th { & .tabs div li { display: inline; + + & .grid-container { + margin-top: 1em; + + & p { + margin-top: 0em; + } + } } }