[前][次][番号順一覧][スレッド一覧]

ruby-changes:71365

From: Masafumi <ko1@a...>
Date: Fri, 11 Mar 2022 17:38:26 +0900 (JST)
Subject: [ruby-changes:71365] 2e4516be26 (master): [ruby/rdoc] Scrollable sidebar

https://git.ruby-lang.org/ruby.git/commit/?id=2e4516be26

From 2e4516be26e126ec9e7528d1de0d4a0b7332f6dd Mon Sep 17 00:00:00 2001
From: Masafumi Koba <473530+ybiquitous@u...>
Date: Sat, 11 Sep 2021 16:33:34 +0900
Subject: [ruby/rdoc] Scrollable sidebar

This change makes the sidebar scrollable via `position: sticky` and `overflow: auto`;
See also <https://caniuse.com/?search=sticky>

https://github.com/ruby/rdoc/commit/4d52e24840
---
 lib/rdoc/generator/template/darkfish/css/rdoc.css | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/rdoc/generator/template/darkfish/css/rdoc.css b/lib/rdoc/generator/template/darkfish/css/rdoc.css
index ebe2e93af6..7451b6ecb9 100644
--- a/lib/rdoc/generator/template/darkfish/css/rdoc.css
+++ b/lib/rdoc/generator/template/darkfish/css/rdoc.css
@@ -186,6 +186,10 @@ nav { https://github.com/ruby/ruby/blob/trunk/lib/rdoc/generator/template/darkfish/css/rdoc.css#L186
   font-family: Helvetica, sans-serif;
   font-size: 14px;
   border-right: 1px solid #ccc;
+  position: sticky;
+  top: 0;
+  overflow: auto;
+  height: calc(100vh - 100px); /* reduce the footer height */
 }
 
 main {
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]