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

Fullscreen CSS tweak #102

Closed
richchurcher opened this issue Feb 2, 2024 · 4 comments
Closed

Fullscreen CSS tweak #102

richchurcher opened this issue Feb 2, 2024 · 4 comments

Comments

@richchurcher
Copy link

richchurcher commented Feb 2, 2024

Thanks so much for maintaining this template, I really appreciate it especially the out-of-the-box CI/CD.

I notice that in order to get Itch.io full-screen working correctly (i.e. actually full-screen and not letterboxed) I'm needing to add the following CSS:

canvas#bevy {
    flex-grow: 1;
    z-index: 2;
    height: 100% !important;
    width: 100% !important;
}

Perhaps a trifle hacky, but it does work. I think it may be something to do with the various styles Itch itself injects. Would you accept a PR like this, or is it something you'd prefer folks add after the fact?

Edit: I also needed to add

    height: 100%;
    width: 100%;

to .game-container.

@NiklasEi
Copy link
Owner

NiklasEi commented Feb 4, 2024

The default should stay as is in my opinion. This way the canvas is not full screen just like the window of default bevy is not full screen.

@richchurcher
Copy link
Author

FYI with fit_canvas_to_parent going away, folks will probably need to tweak their CSS in any case: bevyengine/bevy#11057

@NiklasEi
Copy link
Owner

NiklasEi commented Feb 29, 2024

The option will likely be back with the next version, see bevyengine/bevy#11278
I am tracking in #104

@richchurcher
Copy link
Author

Oh, nice. Yeah, that seems better TBH.

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

No branches or pull requests

2 participants