diff --git a/src/styles/custom.css b/src/styles/custom.css index d7437b2..3c8c950 100644 --- a/src/styles/custom.css +++ b/src/styles/custom.css @@ -326,16 +326,19 @@ div.header { .doc-image-trigger { display: block; + width: fit-content; max-width: 100%; + margin-inline: auto; padding: 0; border: 0; background: none; cursor: zoom-in; } -.doc-image-trigger img { display: block; margin: 0; } +.doc-image-trigger img { display: block; margin: 0 auto; } .doc-image-target { cursor: zoom-in; } .doc-image-trigger:focus-visible, .doc-image-target:focus-visible { outline: 3px solid var(--sl-color-accent-high); outline-offset: 4px; } #doc-image-lightbox { + margin: auto; width: 96vw; max-width: 1800px; height: 94dvh; @@ -361,7 +364,7 @@ div.header { } .image-lightbox-view { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; } .image-lightbox-view img { min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; } -#doc-image-lightbox.actual-size .image-lightbox-view { display: block; } -#doc-image-lightbox.actual-size img { max-width: none; max-height: none; width: auto; height: auto; } +#doc-image-lightbox.actual-size .image-lightbox-view { display: flex; } +#doc-image-lightbox.actual-size img { flex: none; margin: auto; max-width: none; max-height: none; width: auto; height: auto; } .image-lightbox-caption { margin: 0; flex-shrink: 0; font-size: .85rem; color: var(--sl-color-gray-2); } html:has(#doc-image-lightbox[open]) { overflow: hidden; }