summaryrefslogtreecommitdiff
path: root/doc/source/_static/numpy.css
diff options
context:
space:
mode:
authorPamphile Roy <roy.pamphile@gmail.com>2022-05-22 18:37:10 +0200
committerGitHub <noreply@github.com>2022-05-22 09:37:10 -0700
commit89b4f725b0babe3ddacb60df972118c9bc6e0e4a (patch)
tree5094b397ecda8b76b731420a6fdb302da6ca8a15 /doc/source/_static/numpy.css
parent7f5d234ef617c4c34376c003879bd64bce5ccdfb (diff)
downloadnumpy-89b4f725b0babe3ddacb60df972118c9bc6e0e4a.tar.gz
DOC: Style version switcher button (#21451)
* DOC: use PR ref as version name in CircleCI preview * DOC: style version button depending on release * DOC: fix logic for switcher_version. [skip actions] [skip azp] [skip travis] * DOC: provision empty dataset attribute and simplify not. [skip actions] [skip azp] [skip travis]
Diffstat (limited to 'doc/source/_static/numpy.css')
-rw-r--r--doc/source/_static/numpy.css30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/source/_static/numpy.css b/doc/source/_static/numpy.css
index fc296e8ab..b68bb3780 100644
--- a/doc/source/_static/numpy.css
+++ b/doc/source/_static/numpy.css
@@ -32,6 +32,36 @@ h3 {
letter-spacing: -.03em;
}
+/* Style the active version button.
+
+- dev: orange
+- stable: green
+- old, PR: red
+
+Colors from:
+
+Wong, B. Points of view: Color blindness.
+Nat Methods 8, 441 (2011). https://doi.org/10.1038/nmeth.1618
+*/
+
+/* If the active version has the name "dev", style it orange */
+#version_switcher_button[data-active-version-name*="dev"] {
+ background-color: #E69F00;
+ border-color: #E69F00;
+}
+
+/* green for `stable` */
+#version_switcher_button[data-active-version-name*="stable"] {
+ background-color: #009E73;
+ border-color: #009E73;
+}
+
+/* red for `old` */
+#version_switcher_button:not([data-active-version-name*="stable"], [data-active-version-name*="dev"], [data-active-version-name=""]) {
+ background-color: #980F0F;
+ border-color: #980F0F;
+}
+
/* Main page overview cards */
.intro-card {