summaryrefslogtreecommitdiff
path: root/src/stylesheets
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2021-08-02 14:43:57 -0600
committerGitHub <noreply@github.com>2021-08-02 14:43:57 -0600
commit28d7af0fcd57231df8f194708afc9837ee95c0ed (patch)
tree64bbd4a9889be26fb2863905036d72f9eea29fae /src/stylesheets
parent9e0eb7568133aca1350e10e9047bff3305c312e3 (diff)
resolves #4116 update default stylesheet to indent content of details element (PR #4117)
- indent content of details element to align with summary - use custom marker to normalize appearance and behavior across browsers
Diffstat (limited to 'src/stylesheets')
-rw-r--r--src/stylesheets/asciidoctor.css39
1 files changed, 36 insertions, 3 deletions
diff --git a/src/stylesheets/asciidoctor.css b/src/stylesheets/asciidoctor.css
index 9da90644..3de3f402 100644
--- a/src/stylesheets/asciidoctor.css
+++ b/src/stylesheets/asciidoctor.css
@@ -1150,11 +1150,44 @@ details,
margin-bottom: 1.25em;
}
-details > summary:first-of-type {
+details {
+ margin-left: 1.25rem;
+}
+
+details > summary {
cursor: pointer;
- display: list-item;
- outline: none;
+ display: block;
+ position: relative;
+ line-height: 1.6;
margin-bottom: 0.625rem;
+ -webkit-tap-highlight-color: transparent;
+}
+
+details > summary::before {
+ content: "";
+ border: solid transparent;
+ border-left-color: currentColor;
+ border-width: 0.3em 0 0.3em 0.5em;
+ position: absolute;
+ top: 0.5em;
+ left: -1.25rem;
+ transform: translateX(15%);
+}
+
+details[open] > summary::before {
+ border: solid transparent;
+ border-top-color: currentColor;
+ border-width: 0.5em 0.3em 0;
+ transform: translateY(15%);
+}
+
+details > summary::after {
+ content: "";
+ width: 1.25rem;
+ height: 1em;
+ position: absolute;
+ top: 0.3em;
+ left: -1.25rem;
}
.admonitionblock td.content > .title,