diff options
-rw-r--r-- | assets/css/default.css | 42 | ||||
-rw-r--r-- | themes/default/layouts/shortcodes/disclose.html | 6 |
2 files changed, 32 insertions, 16 deletions
diff --git a/assets/css/default.css b/assets/css/default.css index 4a6a834..24e811a 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -780,6 +780,7 @@ select { } button, +summary:after, [type="reset"], [type="button"], [type="submit"], @@ -1311,6 +1312,8 @@ micro-summary details[data-disclosure] summary { outline-offset: 0.05rem !important; } +following-list details summary:focus:after, +following-list details[open] summary:focus:after, micro-summary details[data-disclosure] summary:focus a, micro-summary details[data-disclosure] summary:focus:after, micro-summary details[data-disclosure][open] summary:focus:after { @@ -1318,30 +1321,28 @@ micro-summary details[data-disclosure][open] summary:focus:after { border-color: inherit; } -micro-summary details[data-disclosure] summary:hover { - text-decoration: underline; - text-shadow: 0 0 currentColor; -} - following-list details summary:after, following-list details[open] summary:after, micro-summary details[data-disclosure] summary:after, micro-summary details[data-disclosure][open] summary:after { - padding: 0 0.25rem; - margin-left: 0.5ch; - border: 2px solid; - border-color: #ddd; + padding: 0.125rem 0.25rem; border-color: var(--border-darker); border-radius: 0.5rem; - font-variant: small-caps; + display: inline; + font-size: 85%; +} + +micro-summary details[data-disclosure] summary:hover { + text-decoration: underline; + text-shadow: 0 0 currentColor; } micro-summary details[data-disclosure] summary:after { - content: "hidden"; + content: "HIDDEN"; } micro-summary details[data-disclosure][open] summary:after { - content: "opened"; + content: "OPENED"; } micro-summary details[data-disclosure][open] ~ details summary:after { @@ -1692,6 +1693,10 @@ following-list details { text-transform: uppercase; } +following-list details { + position: relative; +} + following-list details h1 { display: inline-block; } @@ -1711,11 +1716,20 @@ following-list:hover details[open] + aside { } following-list details[data-expand="more"] summary:after { - content: "less"; + content: "LESS"; } following-list details[open][data-expand="more"] summary:after { - content: "more"; + content: "MORE"; +} + +following-list details[data-expand="more"] summary:after, +following-list details[open][data-expand="more"] summary:after { + margin-left: 0.5rem; + top: 50%; + transform: translateY(-50%); + position: absolute; + height: 1.5rem; } author-list:hover h1, diff --git a/themes/default/layouts/shortcodes/disclose.html b/themes/default/layouts/shortcodes/disclose.html index 2cc99c7..c5e7c2c 100644 --- a/themes/default/layouts/shortcodes/disclose.html +++ b/themes/default/layouts/shortcodes/disclose.html @@ -4,7 +4,9 @@ {{- $text = .Inner -}} {{- end -}} -<details data-disclosure> - <summary>{{ (or $.Page.Params.title $text) | markdownify }}</summary> +<details data-disclosure=""> + <summary> + {{ (or $.Page.Params.title $text) | markdownify }} + </summary> </details> {{- /* This comment removes trailing newlines and white spaces. */ -}} |