Skip to content

Update example page styling to stretch the canvas #152

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

Merged
merged 1 commit into from
May 11, 2025

Conversation

aglitchman
Copy link
Contributor

This change stretches the game canvas to the full available width of the div.

Pros:

  1. it's easier to see examples on mobile devices
  2. on a small page width, the right column does not overlap the canvas
  3. the game looks more natural on the page

Technical detail: the code with width 100% is placed in css, because something removes it from the canvas style when resizing the page (dmloader?).

Before:
image
image

After:
image
image

Fixes #151

Copy link
Collaborator

@britzl britzl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thanks!

@britzl britzl merged commit 6fdf979 into defold:master May 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Examples are difficult to view on mobile devices
2 participants