Skip to content

Commit

Permalink
Fix file list in Safari
Browse files Browse the repository at this point in the history
Safari does not support the `::marker` psuedo-element.  It does support
a `::-webkit-details-marker` psuedo-element, but that element's
`content` cannot be set.  Therefore, to achieve the desired appearance
in Safari (as well as other browsers), this commit hides the summary
marker and uses `summary::before` to render the `+` and `-` icons.
  • Loading branch information
jonathanhefner committed Aug 6, 2023
1 parent d77123f commit c4d632e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/rdoc/generator/template/rails/resources/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,14 @@ details.more-less summary:hover {
color: inherit;
}

details.more-less summary::marker {
details.more-less summary {
list-style-type: none;
}
details.more-less summary::-webkit-details-marker {
display: none;
}

details.more-less summary::before {
font-size: 1.15em;
content: "+";
}
Expand All @@ -477,7 +484,7 @@ details.more-less[open] summary {
top: calc(100% + 0.5em);
}

details.more-less[open] summary::marker {
details.more-less[open] summary::before {
content: "-";
}

Expand Down

0 comments on commit c4d632e

Please sign in to comment.