Toolbar have wrong padding with safe area insets #48
Labels
No labels
bug
duplicate
feature
accepted
feature
proposal
help wanted
invalid
performance
question
user-agent/chromium
user-agent/webkit
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Rubicon/tutu#48
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
margin-left: var(--safe-area-inset-left);
margin-right: var(--safe-area-inset-right);
This style cause the stacked pages have the padding even they are not impacted by the insets (since the max-width of stacked page is 560px).
This has two solutions:
I prefer the first. The key problem for this option is, when the screen is between 560px to 560px+var(—safe-area-inset-left)+var(—safe-area-inset-right), the actual inset is between the original value to 0px.
As we can get the insets in js (by getComputedStyle), we can calculate this by hand and set on the element. I still want to see if we can finalise a better solution without JS and assumptions (by this way our insets must be resolved on one specific element).