From 20a897f612f723a8bb559e118f61b864e3e9faab Mon Sep 17 00:00:00 2001 From: Kuuuube <61125188+Kuuuube@users.noreply.github.com> Date: Wed, 1 Jan 2025 03:40:06 -0500 Subject: [PATCH] Add back content-visibility: auto and make image go upwards to not get cut off when on bottom of entry container (#1738) * Add back `content-visibility: auto` and make image not get cut off when on bottom of entry container * Update tests --- ext/css/display.css | 1 + ext/css/structured-content.css | 3 ++- ext/data/structured-content-style.json | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ext/css/display.css b/ext/css/display.css index 91a306bce..c44c3f26b 100644 --- a/ext/css/display.css +++ b/ext/css/display.css @@ -832,6 +832,7 @@ button.action-button:active { .entry { padding: var(--entry-vertical-padding) var(--entry-horizontal-padding); position: relative; + content-visibility: auto; contain-intrinsic-height: auto 500px; } .entry+.entry { diff --git a/ext/css/structured-content.css b/ext/css/structured-content.css index 020c7362e..b4101a9e9 100644 --- a/ext/css/structured-content.css +++ b/ext/css/structured-content.css @@ -175,7 +175,8 @@ z-index: 1; } .entry:nth-last-of-type(1):not(:nth-of-type(1)) .gloss-image-link[data-collapsed=true] .gloss-image-container, -:root[data-glossary-layout-mode=compact] .entry:nth-last-of-type(1):not(:nth-of-type(1)) .gloss-image-link[data-collapsible=true] .gloss-image-container { +:root[data-glossary-layout-mode=compact] .entry:nth-last-of-type(1):not(:nth-of-type(1)) .gloss-image-link[data-collapsible=true] .gloss-image-container, +:root[data-glossary-layout-mode=compact] .definition-item:nth-last-of-type(1) .gloss-image-link[data-collapsible=true] .gloss-image-container { bottom: 100%; top: auto; } diff --git a/ext/data/structured-content-style.json b/ext/data/structured-content-style.json index f3bfcf5a6..74f46764e 100644 --- a/ext/data/structured-content-style.json +++ b/ext/data/structured-content-style.json @@ -252,7 +252,8 @@ { "selectors": [ ".entry:nth-last-of-type(1):not(:nth-of-type(1)) .gloss-image-link[data-collapsed=true] .gloss-image-container", - ":root[data-glossary-layout-mode=compact] .entry:nth-last-of-type(1):not(:nth-of-type(1)) .gloss-image-link[data-collapsible=true] .gloss-image-container" + ":root[data-glossary-layout-mode=compact] .entry:nth-last-of-type(1):not(:nth-of-type(1)) .gloss-image-link[data-collapsible=true] .gloss-image-container", + ":root[data-glossary-layout-mode=compact] .definition-item:nth-last-of-type(1) .gloss-image-link[data-collapsible=true] .gloss-image-container" ], "styles": [ ["bottom", "100%"],