feat: Introduce MediaViewer component to centralize media rendering and refactor document preview and zoom overlay to use it, along with new CSS padding variables.

This commit is contained in:
2025-11-28 09:08:28 +01:00
parent 0b4a9441d0
commit 65ad1f6cfa
7 changed files with 151 additions and 87 deletions
+5 -4
View File
@@ -382,7 +382,9 @@
max-height: 100%;
grid-area: viewport;
background: var(--surface-subtle);
--pdf-viewer-stack-padding: 0.75rem;
padding: 1.5vmin;
box-sizing: border-box;
--pdf-viewer-stack-padding: 1.5vmin;
}
.document-viewer__object {
@@ -458,7 +460,6 @@
align-items: center;
--pdf-viewer-viewport-width: 100%;
--pdf-viewer-viewport-height: 100%;
padding: var(--pdf-viewer-stack-padding, 0);
width: 100%;
box-sizing: border-box;
}
@@ -481,9 +482,9 @@
}
.pdf-viewer__canvas-stack--fit-width .pdf-viewer__page-wrapper--limit-width {
width: var(--pdf-viewer-page-width, 100%);
width: 100%;
height: auto;
aspect-ratio: calc(var(--pdf-viewer-page-width) / var(--pdf-viewer-page-height));
aspect-ratio: var(--pdf-viewer-page-aspect, calc(var(--pdf-viewer-page-width) / var(--pdf-viewer-page-height)));
}
.pdf-viewer__canvas-stack--contain .pdf-viewer__page-wrapper--limit-height {