Changeset cb95343 in Klonkt for src/assets/css/embed.css


Ignore:
Timestamp:
06/27/2026 08:30:29 AM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
a3e0746
Parents:
9e4e4ff
Message:

fix(embeds): plain responsive iframe on mobile/touch

The custom JS-mounted player cards need the platform API + an i.ytimg.com poster, both
of which mobile Safari tracking-protection blocks → a blank/black box. On touch / coarse-
pointer devices, render the plain platform iframe directly (YouTube/SoundCloud/Spotify),
using a padding-ratio wrapper that reserves height on every browser incl. old iOS Safari.
Desktop keeps the rich card. embed.css v9, embed-player.js v17.

File:
1 edited

Legend:

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

    r9e4e4ff rcb95343  
    275275.pcms-embed-pp,
    276276.pcms-embed-poster { -webkit-tap-highlight-color: transparent; }
     277
     278/* ---- Mobile / touch: plain platform iframe instead of the JS-mounted card.
     279   padding-ratio reserves height on every browser (incl. old iOS Safari). ---- */
     280.pcms-embed-plain { background: transparent; box-shadow: none; }
     281.pcms-embed-ratio { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; }
     282.pcms-embed-ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
     283.pcms-embed-plain-frame { width: 100%; border: 0; display: block; border-radius: 10px; }
     284.pcms-embed-plain-link { display: inline-block; padding: .5rem .9rem; }
Note: See TracChangeset for help on using the changeset viewer.