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

The canvas can get too tall #9

Open
VirtualParticle opened this issue Nov 5, 2019 · 0 comments
Open

The canvas can get too tall #9

VirtualParticle opened this issue Nov 5, 2019 · 0 comments

Comments

@VirtualParticle
Copy link
Member

The canvas scales with the width of the viewport and ignores the height. This means that if the display is very wide, the canvas can get so tall that the page overflows, with the canvas itself potentially being taller than the display. For the main page with the game in particular, I think we should avoid allowing it to scroll at all and automatically cap the height of the canvas to reflect that, but other pages should be allowed the scroll.

One way to solve this is to set max-height: 80vh or some other number for the canvas, but it would be good to avoid hard-coding in case we change the height of the footer or header which could potentially require a new number.

This can also be accomplished pretty easily using JavaScript reacting whenever the page scales, but a pure CSS solution would be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant