-
Notifications
You must be signed in to change notification settings - Fork 100
ios: fix safe area #3232
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
base: master
Are you sure you want to change the base?
ios: fix safe area #3232
Conversation
@@ -51,8 +51,8 @@ | |||
.header { | |||
background-color: var(--color-blue); | |||
flex-shrink: 0; | |||
height: var(--header-height); | |||
padding: 0 var(--space-default); | |||
padding: 23px var(--space-default); |
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 ditched the fixed height and opted for padding-y: 23px
, which achieves the same result as height: 70px
but is easier to manipulate when factoring in safe-area-inset-top.
padding-top: env(safe-area-inset-top, 0); | ||
padding-left: env(safe-area-inset-left, 0); | ||
padding-right: env(safe-area-inset-right, 0); |
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.
These safe-area-inset-*
are built-in variables that provide values which vary based on the device, screen size, and display type (e.g devices with notches / rounded corners)
db69ef7
to
4293f07
Compare
4293f07
to
08beb50
Compare
frontends/web/index.html
Outdated
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" /> | ||
<meta name="theme-color" content="#000000" /> | ||
<title>BitBoxApp</title> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/index.tsx"></script> | ||
</body> | ||
|
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.
Did you remove the indentation on purpose? Please indent again if it was an accident
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.
tACK, tested on my iPhone in portrait and landscape mode and it works great.
Didn't check the code much, as I am out of my depth.
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.
Found bug: dialogs (like tor proxy settings) overlap at the top with an iOS element and the dialog title becomes unreadable.
ba24b32
to
c1aba6c
Compare
4c12fe1
to
0b3d9b3
Compare
rebased |
0b3d9b3
to
9ef2b22
Compare
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.
tACK
The iOS app is bounded within the safe area causing white area / screen to be shown on the top & bottom edges on iPhones & iPads with notches and rounded corners.