diff options
author | Masafumi Koba <[email protected]> | 2023-05-26 22:52:12 +0900 |
---|---|---|
committer | git <[email protected]> | 2023-05-26 16:26:46 +0000 |
commit | 94e5ecbbdd9ea1610dd8aaa55a6f9aa3ddb15ab1 (patch) | |
tree | ab957fd68f90dab47516de4c462d22ba6804150c /lib/rdoc | |
parent | 54b7ce0bff461aae5492afd6df421669cbf1a73a (diff) |
[ruby/rdoc] Improve `<summary>` CSS on sidebar
- Use a smaller font size for the toggle symbol. (Currently, it seems a little too large)
- Use the child combinator (`>`) to unify selectors.
- Use `margin-left` instead of whitespace within the `content` property.
- Use `::` instead of outdated `:` for the pseudo-element symbol.
(See https://developer.mozilla.org/en-US/docs/Web/CSS/::before)
https://github.com/ruby/rdoc/commit/61ce0a7d75
Diffstat (limited to 'lib/rdoc')
-rw-r--r-- | lib/rdoc/generator/template/darkfish/css/rdoc.css | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/rdoc/generator/template/darkfish/css/rdoc.css b/lib/rdoc/generator/template/darkfish/css/rdoc.css index d277bfdf35..ddaf4d47c6 100644 --- a/lib/rdoc/generator/template/darkfish/css/rdoc.css +++ b/lib/rdoc/generator/template/darkfish/css/rdoc.css @@ -320,23 +320,26 @@ dl.note-list dt { background: url(../images/arrow_up.png) no-repeat right center; } -.nav-section details summary { +.nav-section details > summary { display: block; } -.nav-section details summary::-webkit-details-marker { +.nav-section details > summary::-webkit-details-marker { display: none; } -.nav-section details summary:before { +.nav-section details > summary::before { content: ""; } -.nav-section details summary:after { - content: " \25B6"; /* BLACK RIGHT-POINTING TRIANGLE */ +.nav-section details > summary::after { + content: "\25B6"; /* BLACK RIGHT-POINTING TRIANGLE */ + font-size: 0.8em; + margin-left: 0.4em; } -.nav-section details[open] > summary:after { - content: " \25BD"; /* WHITE DOWN-POINTING TRIANGLE */ + +.nav-section details[open] > summary::after { + content: "\25BD"; /* WHITE DOWN-POINTING TRIANGLE */ } /* @end */ |