Skip to content

Commit 61ce0a7

Browse files
ybiquitousnobu
authored andcommitted
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)
1 parent 2db5097 commit 61ce0a7

File tree

1 file changed

+10
-7
lines changed
  • lib/rdoc/generator/template/darkfish/css

1 file changed

+10
-7
lines changed

lib/rdoc/generator/template/darkfish/css/rdoc.css

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,23 +320,26 @@ dl.note-list dt {
320320
background: url(../images/arrow_up.png) no-repeat right center;
321321
}
322322

323-
.nav-section details summary {
323+
.nav-section details > summary {
324324
display: block;
325325
}
326326

327-
.nav-section details summary::-webkit-details-marker {
327+
.nav-section details > summary::-webkit-details-marker {
328328
display: none;
329329
}
330330

331-
.nav-section details summary:before {
331+
.nav-section details > summary::before {
332332
content: "";
333333
}
334334

335-
.nav-section details summary:after {
336-
content: " \25B6"; /* BLACK RIGHT-POINTING TRIANGLE */
335+
.nav-section details > summary::after {
336+
content: "\25B6"; /* BLACK RIGHT-POINTING TRIANGLE */
337+
font-size: 0.8em;
338+
margin-left: 0.4em;
337339
}
338-
.nav-section details[open] > summary:after {
339-
content: " \25BD"; /* WHITE DOWN-POINTING TRIANGLE */
340+
341+
.nav-section details[open] > summary::after {
342+
content: "\25BD"; /* WHITE DOWN-POINTING TRIANGLE */
340343
}
341344

342345
/* @end */

0 commit comments

Comments
 (0)