summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Lo <[email protected]>2024-08-08 21:02:46 +0100
committerGitHub <[email protected]>2024-08-08 13:02:46 -0700
commit64a7b87e1dbbb4d45549f1bcaae6790287ee5007 (patch)
tree4e75383fea76fcb26faf7f6f43daa67bd59599d7
parent0bff07644ba5aff9c844b6cf75a0e1365c35c6a3 (diff)
Sync rdoc to fix master doc's display issue (#11345)
Sync rdoc This syncs changes made in https://github.com/ruby/rdoc/pull/1148, which will fix https://docs.ruby-lang.org/en/master/'s display on certain screens.
Notes
Notes: Merged-By: k0kubun <[email protected]>
-rw-r--r--lib/rdoc/generator/template/darkfish/css/rdoc.css23
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/rdoc/generator/template/darkfish/css/rdoc.css b/lib/rdoc/generator/template/darkfish/css/rdoc.css
index 00045abb58..d0f14067ab 100644
--- a/lib/rdoc/generator/template/darkfish/css/rdoc.css
+++ b/lib/rdoc/generator/template/darkfish/css/rdoc.css
@@ -9,6 +9,10 @@
/* vim: ft=css et sw=2 ts=2 sts=2 */
/* Base Green is: #6C8C22 */
+:root {
+ --sidebar-width: 300px;
+}
+
.hide { display: none !important; }
* { padding: 0; margin: 0; }
@@ -209,21 +213,15 @@ nav {
z-index: 10;
/* Layout */
- width: 300px;
+ width: var(--sidebar-width);
min-height: 100vh;
background: white;
}
-@media (min-width: 1024px) {
- nav {
- min-height: unset;
- height: calc(100vh - 100px); /* reduce the footer height */
- }
-}
-
main {
display: block;
- margin: 3em 1em 1em;
+ margin: 3em auto 1em;
+ padding: 0 1em; /* Add padding to keep space between main content and sidebar/right side of the screen */
min-width: 340px;
font-size: 16px;
width: 100%;
@@ -232,8 +230,7 @@ main {
@media (min-width: 1024px) {
main {
- margin-left: auto;
- margin-right: auto;
+ margin-left: var(--sidebar-width);
}
}
@@ -731,4 +728,8 @@ pre {
font-family: "Source Code Pro", Monaco, monospace;
}
+footer {
+ z-index: 20;
+}
+
/* @end */