fix: my-sea drawn cards no longer always render levity-coded — yesterday's feedback_polarity_must_agree_across_surfaces fix (f59c1af) added .my-sea-page[data-polarity="..."] to the shared .sig-overlay, .my-sign-page polarity block at _card-deck.scss:919. Worked for the spread-center sig (.sea-sig-card) but silently bled into the drawn-card stage modal: the stage's element carries BOTH classes .sig-stage-card sea-stage-card (per _sea_stage.html:12), so the shared rule's .sig-stage-card descendant selector matched. Specificity .my-sea-page[data-polarity="levity"] .sig-stage-card = 0,3,0 silently beat the card-specific .sea-stage--gravity .sea-stage-card = 0,2,0 (set by sea.js's _showStage(isLevity) at line 104-108) → every drawn card on my-sea rendered the user's-sig polarity instead of the deck-stack it was actually drawn from. Room.html Sea Select unaffected (no .my-sea-page ancestor on the stage there). User-reported 2026-05-21 — symptom: a gravity card opened in my-sea stage shows the light/cream levity styling even though the card came from the gravity deck. Fix: drop .my-sea-page[data-polarity] from the shared selector list at _card-deck.scss:917-919 + :972-974; add a NEW dedicated rule at the end of the shared block scoped tightly to .sig-stage-card.sea-sig-card (0,4,0 specificity) — the central sig stays page-polarity-driven (yesterday's MySeaPolarityMatchesMySignTest still pins this) but every other .sig-stage-card descendant (drawn-card stages, future spread elements) is free to follow its own polarity. Gravity is the default rendering for .sea-sig-card per the base rule at :1379 so only the levity override needs an explicit block. 6/6 existing polarity + picker ITs green; visual verify deferred to user. Trap captured: [[feedback-page-polarity-scope-trap]] — multi-class elements (.A.B) match both shared (.A) AND scoped (.B) selectors, so any new page wrapper added to a shared block needs an audit of every descendant selector in the block for nested polarity overlap
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -914,9 +914,17 @@ html:has(.sig-backdrop) {
|
||||
// same polarity-themed colour rules apply to the standalone Game Sign picker.
|
||||
// data-polarity lives on the page wrapper (not on .my-sign-stage) so descendant
|
||||
// `.sig-card` (in the grid, sibling to the stage) inherits the rules.
|
||||
// NOTE: `.my-sea-page[data-polarity="..."]` deliberately NOT in this shared
|
||||
// selector list (was bitten 2026-05-21 by drawn-card stage bleed). My-sea's
|
||||
// drawn cards open into the `.sea-stage` modal whose `.sig-stage-card.sea-
|
||||
// stage-card` element has BOTH classes — so a `.my-sea-page[data-polarity]
|
||||
// .sig-stage-card` rule (0,3,0) silently overrides the proper card-specific
|
||||
// `.sea-stage--levity/--gravity .sea-stage-card` polarity (0,2,0), forcing
|
||||
// every drawn card's stage to inherit the user's sig polarity. My-sea's own
|
||||
// page polarity rules live below + target ONLY `.sea-sig-card` (the spread-
|
||||
// center sig). See [[feedback-page-polarity-scope-trap]].
|
||||
.sig-overlay[data-polarity="levity"],
|
||||
.my-sign-page[data-polarity="levity"],
|
||||
.my-sea-page[data-polarity="levity"] {
|
||||
.my-sign-page[data-polarity="levity"] {
|
||||
// Mini card: inverted palette. game-kit sets explicit colours on .fan-card-name
|
||||
// and .fan-card-corner that out-specifc the parent color, so re-target them here.
|
||||
.sig-card {
|
||||
@@ -970,8 +978,7 @@ html:has(.sig-backdrop) {
|
||||
// Cursor colours live in .sig-cursor-float[data-role] rules (portal elements)
|
||||
}
|
||||
.sig-overlay[data-polarity="gravity"],
|
||||
.my-sign-page[data-polarity="gravity"],
|
||||
.my-sea-page[data-polarity="gravity"] {
|
||||
.my-sign-page[data-polarity="gravity"] {
|
||||
// Stat block: invert priUser/secUser so gravity gets the same stark contrast as leavened cards
|
||||
.sig-stat-block {
|
||||
background: rgba(var(--secUser), 0.75);
|
||||
@@ -1004,6 +1011,25 @@ html:has(.sig-backdrop) {
|
||||
// Cursor colours live in .sig-cursor-float[data-role] rules (portal elements)
|
||||
}
|
||||
|
||||
// ── My-sea page polarity: scoped to `.sea-sig-card` only ──────────────────────
|
||||
// The user's chosen sig (rendered as `.sig-stage-card.sea-sig-card` in the
|
||||
// spread-center cell) is the ONLY element on my-sea whose colours track the
|
||||
// page-level `data-polarity` (= `User.significator_reversed`). Drawn cards
|
||||
// belong to their own polarity from the deck-stack they were pulled from +
|
||||
// must NOT inherit the user's sig polarity — see big NOTE above the shared
|
||||
// `.sig-overlay`/`.my-sign-page` block for the bleed trap that prompted this
|
||||
// scoping (2026-05-21 bug).
|
||||
//
|
||||
// Gravity is the default rendering (`.sig-stage-card.sea-sig-card` base rule
|
||||
// sets `background: --priUser, color: --secUser` at `_card-deck.scss:1379`)
|
||||
// so we only need an override for the LEVITY case here — same idea as the
|
||||
// `.sig-overlay[data-polarity="levity"] .sig-stage-card` block above.
|
||||
.my-sea-page[data-polarity="levity"] .sig-stage-card.sea-sig-card {
|
||||
background: rgba(var(--secUser), 1);
|
||||
border-color: rgba(var(--priUser), 0.6);
|
||||
color: rgba(var(--priUser), 1); // currentColor propagates to .fan-corner-rank + i
|
||||
}
|
||||
|
||||
// ─── Sig select: landscape overrides ─────────────────────────────────────────
|
||||
// Cascade (each step is a SUPERSET of the prior):
|
||||
// narrow landscape → 6 cols × 2.5rem, row layout (stage beside grid)
|
||||
|
||||
Reference in New Issue
Block a user