From babad5e9049bec2059c1c5fda4090e693b8bcf49 Mon Sep 17 00:00:00 2001 From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com> Date: Wed, 22 May 2024 06:08:56 +0200 Subject: [PATCH] fix: add missing feature of [data-expand] --- styles/@layouts/mod.css | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/styles/@layouts/mod.css b/styles/@layouts/mod.css index 2136b80..8f655c3 100644 --- a/styles/@layouts/mod.css +++ b/styles/@layouts/mod.css @@ -68,21 +68,25 @@ body.layout-simple > aside > nav:only-child { margin: 0; } -body.layout-simple > aside:nth-of-type(1)[data-expandable] { - margin-left: -1.5rem; - margin-right: -1.5rem; - grid-area: aside1; - max-height: var(--ly-aside-size-small); +body.layout-simple > aside:nth-of-type(1):is([data-expandable], [data-expand]) { display: block; overflow: hidden; + max-height: var(--ly-aside-size-small); + margin-right: -1.5rem; + margin-left: -1.5rem; + grid-area: aside1; +} + +body.layout-simple > aside:nth-of-type(1)[data-expand] { + max-height: none; } body.layout-simple > aside:nth-of-type(1)[data-expandable]::before { - content: attr(data-expandable); display: flex; - justify-content: center; - align-items: center; height: var(--ly-aside-size-small); + align-items: center; + justify-content: center; + content: attr(data-expandable); cursor: pointer; } @@ -108,11 +112,11 @@ body.layout-simple > aside a { display: none; } - body.layout-simple > aside:nth-of-type(1)[data-expandable] { - margin-left: 0; - margin-right: 0; - max-height: none; + body.layout-simple > aside:nth-of-type(1):is([data-expandable], [data-expand]) { overflow: unset; + max-height: none; + margin-right: 0; + margin-left: 0; } body.layout-simple:has(> aside:nth-of-type(1)) {