[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
This commit is contained in:
Masafumi Koba 2023-05-26 22:52:12 +09:00 committed by git
parent 54b7ce0bff
commit 94e5ecbbdd

View File

@ -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 */