-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Make horizontal padding relative to device width #20047
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
Conversation
6a6c68a
to
d929aff
Compare
The fixed -400px horizontal offset used by scrollIntoView led to horizontal scroll only moving part-way right on narrow screens. The highlights near the right-edge remained party or completely off screen. This centres the highlighted match on any viewport width while clamping the left margin to 20-400px. On very narrow screens the scrollbar now moves all the way to the right instead of stopping midway.
d929aff
to
c138887
Compare
/botio integrationtest |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 1 Live output at: http://54.193.163.58:8877/c6c827a1914a3ce/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/b90a69d5b950b66/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/b90a69d5b950b66/output.txt Total script time: 13.86 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/c6c827a1914a3ce/output.txt Total script time: 26.74 mins
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you.
The fixed -400px horizontal offset used by
scrollIntoView
led to horizontal scroll only moving part-way right on narrow screens. The highlights near the right-edge remained partly or completely offscreen. This can be observed by searching for words on the far-right of the screen on devices with small screens on both Firefox and Chrome.This centres the highlighted match on any viewport width while clamping the left margin to 20-400px. On very narrow screens the scroll bar now moves all the way to the right instead of stopping midway
Note: Since the minimum width of mainContainer is set to 350px, the scrolling into view still doesn't work right for viewports less than 350px on desktop.