Changeset f6b2c68 in Klonkt for src/views/partials/topnav.ejs


Ignore:
Timestamp:
06/26/2026 04:49:12 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
9327a85
Parents:
1c85964
Message:

fix(ios-pwa): pad body for safe-area when masthead is hidden on mobile

Root cause (found via on-device debug): <=767px the masthead is display:none
(bottom-tab replaces it), so its safe-area padding has no effect (height 0) and the
profile-header lands at top=0 behind the Dynamic Island. Landscape (>767px) shows the
masthead so it worked there. Fix: pad body:not(.on-admin) by --ios-safe-top in the same
mobile media query, and make the JS adaptive (masthead hidden -> force body padding,
else masthead). Removed the temporary debug overlay; SW cache -> v14.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/partials/topnav.ejs

    r1c85964 rf6b2c68  
    328328@media (max-width: 767px) {
    329329  body:not(.on-admin) .masthead { display: none; }
     330  /* The masthead is gone on mobile, so it can't carry the iOS safe-area top inset
     331     (env() resolves to 0 in the home-screen PWA; --ios-safe-top is set by JS in shell).
     332     Pad the body instead so the profile-header clears the Dynamic Island / notch. */
     333  body:not(.on-admin) { padding-top: var(--ios-safe-top, 0px); }
    330334}
    331335
Note: See TracChangeset for help on using the changeset viewer.