Browse Source

Merge pull request #6512 from YuriSizov/versions-clean-up

Hide excessive elements from the RTD panel, improve the looks
Max Hilbrunner 2 years ago
parent
commit
83cbbb0382
1 changed files with 26 additions and 4 deletions
  1. 26 4
      _static/css/custom.css

+ 26 - 4
_static/css/custom.css

@@ -1438,6 +1438,24 @@ p + .classref-constant {
     color: var(--navbar-level-1-color);
     color: var(--navbar-level-1-color);
 }
 }
 
 
+.rst-versions .rst-current-version,
+.rst-versions .rst-other-versions {
+    padding: 12px 14px;
+}
+
+.rst-versions .rst-other-versions {
+    color: var(--navbar-heading-color);
+}
+
+.rst-versions .rst-other-versions dl + dl {
+    margin-top: 4px;
+}
+
+.rst-versions .rst-other-versions hr {
+    border-color: var(--hr-color);
+    margin: 12px 0;
+}
+
 .rst-versions .rst-other-versions small {
 .rst-versions .rst-other-versions small {
     color: var(--navbar-level-3-color);
     color: var(--navbar-level-3-color);
 }
 }
@@ -1446,22 +1464,26 @@ p + .classref-constant {
     text-decoration: underline;
     text-decoration: underline;
 }
 }
 
 
-.rst-versions .rst-other-versions {
-    color: var(--navbar-heading-color);
+/* This will hide every segment of the panel, starting with the 4th. */
+.rst-versions .rst-other-versions .injected dl:nth-child(n+4) {
+    display: none;
 }
 }
 
 
 .rst-versions .rst-current-version {
 .rst-versions .rst-current-version {
     background-color: var(--navbar-current-background-color);
     background-color: var(--navbar-current-background-color);
+    border-bottom: 1px solid var(--hr-color);
 }
 }
-
 .rst-versions .rst-current-version:hover {
 .rst-versions .rst-current-version:hover {
     background-color: var(--navbar-current-background-color-hover);
     background-color: var(--navbar-current-background-color-hover);
 }
 }
-
 .rst-versions .rst-current-version:active {
 .rst-versions .rst-current-version:active {
     background-color: var(--navbar-current-background-color-active);
     background-color: var(--navbar-current-background-color-active);
 }
 }
 
 
+.rst-versions .rst-current-version .fa {
+    line-height: 20px;
+}
+
 /* Hide the obnoxious automatic highlight from the search context. */
 /* Hide the obnoxious automatic highlight from the search context. */
 .rst-content .highlighted {
 .rst-content .highlighted {
     background-color: transparent;
     background-color: transparent;