Skip to content

Commit

Permalink
Merge pull request #20352 from neogeek/zoom-min-height-centered-preview
Browse files Browse the repository at this point in the history
Set min-height relative to the viewport and the zoom level.
  • Loading branch information
valentinpalkovic authored Dec 29, 2022
2 parents 30b011f + 3d2280d commit e4377dc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions code/ui/components/src/Zoom/ZoomIFrame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class ZoomIFrame extends Component<IZoomIFrameProps> {
if (browserSupportsCssZoom()) {
Object.assign(this.iframe.contentDocument.body.style, {
zoom: 1 / scale,
minHeight: `calc(100vh / ${1 / scale})`,
});
} else {
Object.assign(this.iframe.contentDocument.body.style, {
Expand Down

0 comments on commit e4377dc

Please sign in to comment.