-
Notifications
You must be signed in to change notification settings - Fork 555
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
Fix for login button being cut off on some mobile devices #1785
Conversation
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.
Small comment about duplication but not a show stopper
css/index.styl
Outdated
@@ -1048,7 +1049,8 @@ loadingSize = 30px | |||
.auth0-lock-widget-container | |||
//mobile view | |||
@media screen and (max-width: 480px) | |||
height 100% | |||
height 100vh /* Support browsers where custom properties are not supported */ |
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.
I'm not very familiar with styl
files but I would guess that this could be a mixin or something to avoid duplication?
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.
Yes it can! Thanks for the idea. I've moved it into a mixin now.
* Calculated real container height for mobile * Moved height calculation into a mixin
* Calculated real container height for mobile * Moved height calculation into a mixin
Changes
This PR resolves an issue on mobile where the login button was being cut off towards the bottom of the screen. This PR implements the technique on CSS Tricks to dynamically calculate the screen height and apply that to a custom variable on
:root
where it can be picked up by the CSS. It uses100vh
as a fallback for those browsers that do not support custom variables.See screenshots in comments.
References
Fixes #1706
Partial fix for #1783
Testing
This has been tested manually on:
Samsung Galaxy S6 (Chrome, Firefox)
Samsung Galaxy S9 (Chrome, Firefox)
Samsung Galaxy Note 8 (Chrome)
Pixel 1 (Chrome)
OnePlus 6T
Chrome Desktop
Firefox Desktop
IE11
This change adds unit test coverage
This change adds integration test coverage
This change has been tested on the latest version of the platform/language
Checklist