Center actual-size images without clipping scrollable edges
This commit is contained in:
@@ -69,8 +69,8 @@ dialog.image-viewer h2.image-viewer-name{font-size:16px;min-width:0;flex:1}
|
||||
.image-viewer-actions button[aria-pressed="true"]{background:var(--accent);color:var(--panel)}
|
||||
.image-viewer-viewport{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;min-width:0;overflow:hidden;background:var(--soft);border-radius:12px}
|
||||
.image-viewer-viewport img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;margin:0}
|
||||
.image-viewer-viewport.actual-size{display:block;overflow:auto}
|
||||
.image-viewer-viewport.actual-size img{width:auto;height:auto;max-width:none;max-height:none;margin:0}
|
||||
.image-viewer-viewport.actual-size{display:flex;align-items:flex-start;justify-content:flex-start;overflow:auto}
|
||||
.image-viewer-viewport.actual-size img{flex:0 0 auto;width:auto;height:auto;max-width:none;max-height:none;margin:auto}
|
||||
@media(max-width:600px){dialog.image-viewer{width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);padding:12px}}
|
||||
|
||||
@media(max-width:600px){.image-viewer-footer{flex-wrap:wrap;gap:8px}.image-viewer-name{flex-basis:100%!important}.image-viewer-actions{width:100%;justify-content:flex-end;gap:6px}.image-viewer-actions button{padding:8px 10px}}
|
||||
|
||||
Reference in New Issue
Block a user