The card-deck tape stops underlapping the next card on mobile

On mobile the Card deck options tape slid under the cards below it.

.pstocks hangs at top:100%, i.e. below its own card and over the next one.
Every .card is position:relative with NO z-index, so they all sit at the
same stacking level and later cards paint over earlier ones in document
order. The tape's own z-index:2 only orders it WITHIN its card, which is
why it looked correct on the last card of a row and vanished under the
next card everywhere else. On a phone the grid is one column, so the very
next card is directly beneath -- hence "really bad on mobile" rather than
merely wrong.

Raising the CARD while one of its tapes is open lifts the whole stacking
context above its siblings. z-index 5 sits above any card and below the
sticky section header at 6, so a revealed tape never covers the header the
reader scrolls with -- a menu that hides its own navigation would be a
worse bug than this one. The tape also gains a stronger shadow so it reads
as sitting ON the card below rather than tangled with it; without an
opaque, shadowed surface the next card's text shows through, which is the
other half of what "underlapping" looks like.

Covers both tapes -- the card sizes and the new packet variants -- since
they share the disclosure.
This commit is contained in:
Doxa Maps 2026-09-28 16:52:10 +00:00
parent ff5aceb58f
commit 64cab53aa5

View file

@ -794,6 +794,15 @@ useShadowStyles(
'display:flex;flex-wrap:wrap;gap:3px;justify-content:center;' +
'box-shadow:0 1px 4px rgba(0,0,0,.10);cursor:default}' +
'.is-dark .pstocks{background:#132019;border-color:rgba(110,231,183,.24)}' +
// ★ The open card outranks its siblings. 5 sits above any card (all of which are z-index:auto)
// and below the sticky section header at 6, so a revealed tape never covers the header the
// reader uses to scroll — a menu that hides its own navigation is a worse bug than the one
// being fixed here.
'.card.has-tape-open{z-index:5}' +
// The tape is OPAQUE and casts a shadow so it reads as sitting ON the card below rather than
// being tangled with it. Without a solid background the next card's text shows through, which is
// the other half of what "underlapping" looks like on a phone.
'.pstocks{box-shadow:0 2px 10px rgba(0,0,0,.18)}' +
'.pfs > legend{margin:0 auto;padding:0 5px;font-size:8px;text-transform:uppercase;' +
'letter-spacing:.6px;font-weight:700;color:#8a93a0}' +
'.is-dark .pfs > legend{color:#7f9c8c}' +
@ -1048,8 +1057,19 @@ useShadowStyles(
</select>
</div>
<div v-show="!isCollapsed(sec.name)" class="grid" :style="gridStyle">
<!-- ★ 'has-tape-open' RAISES THE WHOLE CARD while one of its tapes is revealed. Driver
2026-09-28 on mobile: the Card deck options tape "is underlapping everything … really
bad on mobile". Cause: .pstocks hangs at top:100%, i.e. BELOW its own card and over the
next one, but every .card is position:relative with NO z-index — so they all sit at the
same stacking level and LATER cards paint over earlier ones in document order. The
tape's own z-index:2 only orders it WITHIN its card, which is why it looked fine on the
last card of a row and disappeared under the next one everywhere else. It is worse on a
phone because the grid is one column, so the very next card is directly beneath.
Raising the CARD lifts its whole stacking context above its siblings. -->
<div v-for="item in sec.items" :key="item.id" class="card"
:class="{ 'is-last': lastShown === item.id }" :data-list-id="item.id">
:class="{ 'is-last': lastShown === item.id,
'has-tape-open': deckOpenFor === deckKey(item.id, 'deck') || deckOpenFor === deckKey(item.id, 'packet') }"
:data-list-id="item.id">
<!-- A TOGGLE (showOnMap clears the selection on a second press), so it says whether it is on:
without aria-pressed a second press sounded identical to the first to a screen reader. -->