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
refactor: remove some ltr selectors
HiDeoo committed Aug 5, 2023
commit be864d0a0de8bc04eb229758b753317a8ed61e62
4 changes: 1 addition & 3 deletions packages/starlight/components/Header.astro
Original file line number Diff line number Diff line change
@@ -42,13 +42,11 @@ const { locale } = Astro.props;
:global(:root:not([data-has-toc])) {
--__toc-width: 0rem;
}
:global([dir='ltr']) .header {
--__sl-safe-nav-pad-x: var(--sl-safe-nav-pad-left);
}
:global([dir='rtl']) .header {
--__sl-safe-nav-pad-x: var(--sl-safe-nav-pad-right);
}
.header {
--__sl-safe-nav-pad-x: var(--sl-safe-nav-pad-left);
--__sidebar-width: max(
0rem,
var(--sl-content-inline-start, 0rem) - var(--__sl-safe-nav-pad-x)
2 changes: 1 addition & 1 deletion packages/starlight/layout/PageFrame.astro
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ const t = useTranslations(locale);
}

@media (min-width: 50rem) {
:global([dir='ltr'][data-has-sidebar]) .header {
:global([data-has-sidebar]) .header {
padding-right: var(--sl-safe-nav-pad-right);
}
:global([dir='rtl'][data-has-sidebar]) .header {