Changeset a036251 in Klonkt for src/assets/css/style.css


Ignore:
Timestamp:
06/26/2026 03:24:06 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
76f0e61
Parents:
7ca3ffc
Message:

fix(ios): hand-built safe-area inset (env() returns 0 on iOS Safari + standalone)

env(safe-area-inset-top) resolves to 0 on this iOS in both Safari and the installed PWA
(content under the camera). A boot script measures the inset directly and, if it comes
back empty on a notch/Dynamic-Island iPhone (logical height >= 812), falls back to a fixed
50px. The masthead padding reads --ios-safe-top. CSS buster -> v54.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/assets/css/style.css

    r7ca3ffc ra036251  
    6363    --radius: 8px; --transition: 180ms cubic-bezier(.4,0,.2,1);
    6464    --safe-top: env(safe-area-inset-top, 0); --safe-bot: env(safe-area-inset-bottom, 0);
     65    /* iOS top inset: starts from env(), but a tiny boot script overrides it with a
     66       real/measured value (env() resolves to 0 in some iOS standalone states). */
     67    --ios-safe-top: env(safe-area-inset-top, 0px);
    6568    color-scheme: light dark;
    6669}
     
    507510.masthead {
    508511    border-bottom: 1px solid var(--rule);
    509     padding: calc(1rem + env(safe-area-inset-top, 0px)) 0 1rem;
     512    padding: calc(1rem + var(--ios-safe-top, 0px)) 0 1rem;
    510513    /* GEEN backdrop-filter hier: een voorouder met backdrop-filter blokkeert de
    511514       frosted blur van het user-menu-dropdown eronder. Masthead is toch bijna
     
    16201623        border-top-right-radius: 0;
    16211624        box-shadow: none;
    1622         padding-top: calc(.75rem + env(safe-area-inset-top, 0px));
     1625        padding-top: calc(.75rem + var(--ios-safe-top, 0px));
    16231626        padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    16241627    }
     
    16781681}
    16791682@media (max-width: 400px) {
    1680     .masthead { padding: calc(.5rem + env(safe-area-inset-top, 0px)) 0 .5rem; }
     1683    .masthead { padding: calc(.5rem + var(--ios-safe-top, 0px)) 0 .5rem; }
    16811684    .masthead-inner { gap: .25rem; }
    16821685    .site-title { font-size: 1.05rem; }
     
    27592762
    27602763/* Masthead: compacter */
    2761 .masthead { padding: calc(.55rem + env(safe-area-inset-top, 0px)) 0 .55rem; }
     2764.masthead { padding: calc(.55rem + var(--ios-safe-top, 0px)) 0 .55rem; }
    27622765.masthead-inner { gap: 1rem; }
    27632766.site-title { font-size: 1.25rem; }
Note: See TracChangeset for help on using the changeset viewer.