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

Set height of darkmode-background and darkmode-layer--simple to 150% #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mikkotor
Copy link

@mikkotor mikkotor commented Mar 28, 2023

This allows mobile browsers to render the page nicely when the browser changes the viewable page size while drag-scrolling

Description of the issue

Some mobile browsers, at least Chromium-based browser in Android devices have a viewport set to a height that excludes the nav row at the top and browser button row at the bottom. When dragging and scrolling down on a long page, these browser UI elements smoothly scroll away from view but the viewport size stays the same while the user keeps pressing on the screen.
This makes Darkmode.js look a bit funny since the viewport size stays the same (100%) but the browser reveals content outside of this range. Result is the bottom part of the page is not handled by Darkmode.js CSS blend trick.

Proposed fix

Just setting the height in darkmode-background and darkmode-layer--simple CSS classes to 150% should extend the size enough for this effect to disappear.

This allows mobile browsers to render the page nicely when the browser changes the viewport size while drag-scrolling
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.

None yet

1 participant