Skip to content

Commit

Permalink
Add back content-visibility: auto and make image go upwards to not ge…
Browse files Browse the repository at this point in the history
…t 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
  • Loading branch information
Kuuuube authored Jan 1, 2025
1 parent 28bbc37 commit 20a897f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions ext/css/display.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion ext/css/structured-content.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion ext/data/structured-content-style.json
Original file line number Diff line number Diff line change
Expand Up @@ -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%"],
Expand Down

0 comments on commit 20a897f

Please sign in to comment.