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

Add support for mobile safe areas #436

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
fix: toc list mobile safe areas padding
HiDeoo committed Aug 5, 2023

Verified

This commit was signed with the committer’s verified signature.
commit 74942fd72da57f4c5d7070cb0f9b85e1ae5b5694
Original file line number Diff line number Diff line change
@@ -60,10 +60,10 @@ const { toc, isMobile = false, depth = 0 } = Astro.props;
}
@supports (padding: max(0px)) {
:global([dir='ltr']) .isMobile a {
padding-right: env(safe-area-inset-right);
padding-right: max(var(--pad-inline), env(safe-area-inset-right));
}
:global([dir='rtl']) .isMobile a {
padding-left: env(safe-area-inset-left);
padding-left: max(var(--pad-inline), env(safe-area-inset-left));
}
}
.isMobile:first-child > li:first-child > a {