This commit is contained in:
2026-07-16 17:52:02 +02:00
parent 6a117eeeb3
commit ce852544d1

View File

@@ -1754,47 +1754,34 @@ body.layout-modern .global-sidebar-right {
body.layout-modern .item-layout-container .item-main-content { body.layout-modern .item-layout-container .item-main-content {
grid-column: 2; grid-column: 2;
height: calc(100vh - var(--navbar-h, 50px)); height: calc(100vh - var(--navbar-h, 50px));
display: grid; display: flex;
grid-template-rows: auto auto auto auto; flex-direction: column;
justify-items: center; align-items: center;
overflow: hidden; overflow-x: hidden;
overflow-y: auto;
padding: 20px; padding: 20px;
min-height: 0; min-height: 0;
min-width: 0; min-width: 0;
gap: 0; gap: 0;
overflow-y: scroll;
align-content: center;
} }
/* When image is expanded: flex column so metadata stays below the image */ /* Flex spacers: absorb remaining space to vertically center content when it fits,
body.layout-modern .item-layout-container .item-main-content:has(.embed-responsive.is-expanded) { collapse to 0 when content overflows — so scrolling works naturally. */
display: flex; body.layout-modern .item-layout-container .item-main-content::before,
flex-direction: column; body.layout-modern .item-layout-container .item-main-content::after {
align-items: center; content: '';
flex: 1 0 0px;
} }
/* flex-shrink: 0 prevents children from compressing to fit the fixed-height container. /* All direct children must not shrink so they keep their natural size and
align-self: center overrides the grid-mode "align-self: start" rules — in flex-column the container scrolls instead of compressing children. */
"start" means left, not top, so we explicitly center instead. */ body.layout-modern .item-layout-container .item-main-content > * {
body.layout-modern .item-layout-container .item-main-content:has(.embed-responsive.is-expanded) > * {
flex-shrink: 0; flex-shrink: 0;
align-self: center; width: 100%;
} max-width: 1100px;
body.layout-modern .item-layout-container .item-main-content ._204863 {
align-self: start;
}
body.layout-modern .item-layout-container .item-main-content .item_title {
align-self: start;
}
body.layout-modern .item-layout-container .item-main-content .content {
align-self: start;
} }
body.layout-modern .item-layout-container .item-main-content .metadata { body.layout-modern .item-layout-container .item-main-content .metadata {
align-self: start;
overflow: visible; overflow: visible;
} }