Skip to content

Commit

Permalink
[ruby/rdoc] Improve <summary> CSS on sidebar
Browse files Browse the repository at this point in the history
- 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)

ruby/rdoc@61ce0a7d75
  • Loading branch information
ybiquitous authored and matzbot committed May 26, 2023
1 parent 54b7ce0 commit 94e5ecb
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lib/rdoc/generator/template/darkfish/css/rdoc.css
Expand Up @@ -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 */
Expand Down

0 comments on commit 94e5ecb

Please sign in to comment.