From f4d4ba8a9d789949eb81dadb933b4eb721a8e5fb Mon Sep 17 00:00:00 2001 From: a Date: Sun, 11 Dec 2022 19:46:24 -0600 Subject: [PATCH] style collapsible menus properly --- assets/styles/components/nav-docs.scss | 18 ++++++++++++------ layouts/partials/nav-docs.html | 14 ++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/assets/styles/components/nav-docs.scss b/assets/styles/components/nav-docs.scss index 3a274f6..2268467 100644 --- a/assets/styles/components/nav-docs.scss +++ b/assets/styles/components/nav-docs.scss @@ -21,12 +21,18 @@ padding: 1em 0; .menu { margin-top: 1em; - > li, > details { + > li, > details summary { margin-bottom: 1em; - > a { - display: block; - margin-bottom: 1rem; - } + } + } + details { + margin-bottom: 1em; + } + summary { + font-weight: 700; + cursor: pointer; + &::marker { + content: ''; } } .sub-menu { @@ -47,7 +53,7 @@ content: '↳ '; } } - .section-title > a { + .active > a { font-weight: 700; text-decoration: none; color: inherit; diff --git a/layouts/partials/nav-docs.html b/layouts/partials/nav-docs.html index 4649903..1f2dae8 100644 --- a/layouts/partials/nav-docs.html +++ b/layouts/partials/nav-docs.html @@ -7,9 +7,9 @@ Documentation Menu