Deck analysis shows total cost; tidier analysis layout

A "cost" tile totals the USD price of every copy in the deck (commander
included, maybeboard not). The stat tiles now span the panel and size to
their values, with the color bars and mana curve sharing the row below,
and the left-hand panels no longer spread out to match the analysis
panel's height.

Closes #20
This commit is contained in:
2026-10-23 23:18:27 -05:00
parent b96931c7b8
commit 52873a2180
2 changed files with 46 additions and 11 deletions

View File

@@ -2620,7 +2620,11 @@ tbody tr:hover {
grid-template-areas:
"commander stats"
"meta stats"
"legality stats";
"legality stats"
". stats";
/* The last row takes whatever height the analysis panel adds, so the
left-hand panels stack together instead of spreading out to match. */
grid-template-rows: auto auto auto 1fr;
align-items: start;
}
}
@@ -2701,12 +2705,25 @@ tbody tr:hover {
display: flex;
flex-direction: column;
gap: 8px;
min-width: 220px;
flex: 1 1 240px;
min-width: 0;
}
/* The analysis tiles span the panel above the bars and curve. They size to
their value (a "$1,234" cost is wider than a card count) and share out any
spare width, wrapping on narrow screens rather than squeezing a value past
its tile's edges. */
.deck-stats .stat-tiles-row {
flex-wrap: wrap;
}
.deck-stats .stat-tile {
flex: 1 0 auto;
padding: 8px 10px;
}
.deck-stats-curve {
flex: 1;
min-width: 220px;
max-width: 420px;
/* Shares the row with the color bars, or takes the full width once they
wrap onto separate lines. */
flex: 1 1 240px;
min-width: 0;
display: flex;
flex-direction: column;
}