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

Start button on embedded puzzles scales poorly to mobile #16748

Open
superuser-does opened this issue Jan 8, 2025 · 2 comments
Open

Start button on embedded puzzles scales poorly to mobile #16748

superuser-does opened this issue Jan 8, 2025 · 2 comments
Labels
good first issue Narrow in scope (but not necessarily easy) no scala

Comments

@superuser-does
Copy link
Collaborator

I read this post and found the start buttons to be misplaced on my Motorola Razr 50 Ultra, unfolded, using Firefox for Android. See screenshot showing embedded puzles.

I am seeing similar results when changing it to iPhone SE using Chromium DevTools.
However, I'd be cautious in relying on DevTools as matching the resolution didn't emulate my Android view 1:1. The font that Android carries clearly affects size of the box in CSS.

You could decrease the horizontal padding on the button to fix this, unless you wanted to do it another way - as it may e.g. not meet your aesthetic goals.

The CSS controlling the widget can be found in this file:

.lpv--gamebook {
position: relative;
}
.lpv__gamebook {
@extend %popup-shadow;
z-index: $z-cg__board_overlay-100;
position: absolute;
top: 50%;
@include inline-start(50%);
transform: translate(-50%, -50%);
display: block;
padding: 1.5em 3em;
text-decoration: none;
font-size: 1.5em;
white-space: normal;
}

@superuser-does superuser-does added the good first issue Narrow in scope (but not necessarily easy) label Jan 8, 2025
@DeeBi9
Copy link

DeeBi9 commented Jan 15, 2025

Hi @superuser-does, I tested the misaligned START button issue using Chrome DevTools and found that decreasing the horizontal padding from 3em to 1.5em improved the alignment. While I wasn't able to test this directly on a Motorola Razr 50, the change appears to resolve the issue in the simulated environment.

Should I PR with this update or it requires more refinements or testing ?

Thanks

@superuser-does
Copy link
Collaborator Author

Absolutely - I mentioned that was a simple solution in my initial post.

Here's a visual for reference:

1.5em horizontal + vertical 1.5em horizontal, 3em vertical
Screenshot_20250115_173456 Screenshot_20250115_173747

NB: there are other languages with longer strings for START, but I think it will be fine from a quick check of the wordier languages.

It is just, clearly, not a square anymore.
So the question is if it meets @ornicar's aesthetic goals with the button. If this meets your needs Thibault, I'm happy to commit directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Narrow in scope (but not necessarily easy) no scala
Projects
Status: No status
Development

No branches or pull requests

3 participants