-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix(web): add safe-area-top padding to settings header on mobile #1552
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: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,7 +32,7 @@ function SettingsContentLayout() { | |
| <SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground isolate"> | ||
| <div className="flex min-h-0 min-w-0 flex-1 flex-col bg-background text-foreground"> | ||
| {!isElectron && ( | ||
| <header className="border-b border-border px-3 py-2 sm:px-5"> | ||
| <header className="border-b border-border px-3 py-2 pt-[calc(0.5rem+var(--safe-area-top))] sm:px-5"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Undefined CSS variable breaks header top paddingHigh Severity The CSS custom property |
||
| <div className="flex items-center gap-2"> | ||
| <SidebarTrigger className="size-7 shrink-0 md:hidden" /> | ||
| <span className="text-sm font-medium text-foreground">Settings</span> | ||
|
|
||


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.
The new class uses
pt-[calc(0.5rem+var(--safe-area-top))], but--safe-area-topis not defined anywhere in this commit (repo-wide search only finds this single reference), so the computedpadding-topdeclaration becomes invalid and is ignored by the browser. In practice this leaves the header at the oldpy-2top padding and does not fix notch/Dynamic Island overlap on iOS devices.Useful? React with 👍 / 👎.