fix: mobile dvh and dashboard website header breaking #2841
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes some two style issues that appeared on mobile screen sizes.
The first thing is that the scroll container was set to a height of
calc(100vh - 60px)
which is the screen height minus the header height. For some browsers e.g. Safari on iOS this makes the whole page scrollable so you have two scroll containers and the header can be scrolled out of the viewport which is not wanted. I added another line that uses the dynamic virtual height dvh in addition to the fallback if the used browser does not support dvh.The other issue was that the website header on the dashboard page was using
display: grid
and wrapped even when it was not needed. In addition there was a missing space underneath the button which looked a bit squeezed together.Before:
![IMG_0259](https://private-user-images.githubusercontent.com/60718229/348535672-02b4fec7-633c-42d9-b938-48c3e95662f7.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MTYwNzMsIm5iZiI6MTczOTUxNTc3MywicGF0aCI6Ii82MDcxODIyOS8zNDg1MzU2NzItMDJiNGZlYzctNjMzYy00MmQ5LWI5MzgtNDhjM2U5NTY2MmY3LlBORz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDA2NDkzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThhNzRkNmFmMmFjMDEyY2RlYmE5YmI3NTFlYzM1OGEyNzAwMTdlOTc3MTVkYjlmMmVmMzEwZGM0NmMwNGY5OTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.VLhXVFnlQfDb8UHn_BBnuhPzfhA3UDSDNmX38R2Cndg)
After this shows the fix: there is only one scroll container and the button in the website header is not breaking into the next line. Also there is some padding that makes the spacing more balanced.
![IMG_0260](https://private-user-images.githubusercontent.com/60718229/348535668-2bb3d4c2-a1d3-4109-99e6-8deaeff7e67d.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MTYwNzMsIm5iZiI6MTczOTUxNTc3MywicGF0aCI6Ii82MDcxODIyOS8zNDg1MzU2NjgtMmJiM2Q0YzItYTFkMy00MTA5LTk5ZTYtOGRlYWVmZjdlNjdkLlBORz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDA2NDkzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg3NTFiYmY1MGZmNjk4NWI1ZmNmNDhlZDdlN2IxMGI0ZjViZDhlYzY1ZjAyMGFhYzUxMmJmZjI0NGZmNTM4MGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.QoSbDbQJcbdDWfWoGgALnmPANyIdxTrhk_j83uRhDok)
To replicate the issue just open the dashboard site on any mobile browser preferably one that supports dynamic heights like Safari.