Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set min-height relative to the viewport and the zoom level. #20352

Merged

Conversation

neogeek
Copy link
Contributor

@neogeek neogeek commented Dec 20, 2022

Issue:

What I did

Set the min-height according to the zoom level. Previously the min-height was set based on the viewport height (100vh), but with this fix, the height is now relative to the viewport as well as the zoom level. This prevents overflow when the layout is centered. It also works in the default layout.

How to test

Zoom in without this patch, the preview layout set to centered and the controls open. The layout will overflow. With this patch, the layout will remain in the center when zooming.

Screenshots

Before

Screenshot 2022-12-20 at 2 24 48 PM

After

Screenshot 2022-12-20 at 2 28 42 PM

@valentinpalkovic
Copy link
Contributor

@neogeek Thank you for your contribution. I have tested your changes. The fix works as expected! :)

@valentinpalkovic valentinpalkovic merged commit e4377dc into storybookjs:next Dec 29, 2022
@shilman shilman added the ui label Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants