From 88c58e610829d3ea8b986d5d1f7fd1cff8a65ece Mon Sep 17 00:00:00 2001 From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com> Date: Mon, 19 Aug 2024 14:03:48 +0100 Subject: [PATCH] Add
styling --- internal/assets/static/main.css | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/internal/assets/static/main.css b/internal/assets/static/main.css index 4c04d61..dd9b09d 100644 --- a/internal/assets/static/main.css +++ b/internal/assets/static/main.css @@ -482,6 +482,50 @@ kbd:active { } } +.summary { + width: 100%; + cursor: pointer; + word-spacing: -0.18em; + user-select: none; + list-style: none; + position: relative; + display: flex; +} + +.details[open] .summary { + margin-bottom: .8rem; +} + +.summary::before { + content: ""; + position: absolute; + inset: -.3rem -.8rem; + border-radius: var(--border-radius); + background-color: var(--color-widget-background-highlight); + opacity: 0; + transition: opacity 0.2s; + z-index: -1; +} + +.details[open] .summary::before, .summary:hover::before { + opacity: 1; +} + +.summary::after { + content: "◀"; + font-size: 1.2em; + position: absolute; + top: 0; + bottom: 0; + line-height: 1.3em; + right: 0; + transition: rotate .5s cubic-bezier(0.22, 1, 0.36, 1); +} + +details[open] .summary::after { + rotate: -90deg; +} + .content-bounds { max-width: 1600px; width: 100%;