From c4d632e42a68ddfec1afc58c349ccf2969d3aeb0 Mon Sep 17 00:00:00 2001 From: Jonathan Hefner Date: Sun, 6 Aug 2023 15:52:02 -0500 Subject: [PATCH] Fix file list in Safari 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. --- .../generator/template/rails/resources/css/main.css | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/rdoc/generator/template/rails/resources/css/main.css b/lib/rdoc/generator/template/rails/resources/css/main.css index aaeb7220..1ecb77ee 100644 --- a/lib/rdoc/generator/template/rails/resources/css/main.css +++ b/lib/rdoc/generator/template/rails/resources/css/main.css @@ -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: "+"; } @@ -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: "-"; }