diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-18 17:08:41 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-18 17:08:41 +0100 |
| commit | 8853bafd18e7172b6d12214519db1b167143fe66 (patch) | |
| tree | 5ee8542f0b7c4d0b5db20f0fb5627d6d41ed8885 /static/deck.css | |
| parent | 656486e22e8ee22af88a79d56778025825946cf8 (diff) | |
| download | deck-it-8853bafd18e7172b6d12214519db1b167143fe66.tar.gz deck-it-8853bafd18e7172b6d12214519db1b167143fe66.zip | |
fix(dashboard): keep the game cover from crowding the card
The square Xbox art at the card's full height took most of its width and
squeezed the name and times into a word per line. The game view is
contain: size, so the cover never sizes the card; box art is capped at
45% of the width, square art is shown whole at 55%, and the times stay on
one line.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'static/deck.css')
| -rw-r--r-- | static/deck.css | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/static/deck.css b/static/deck.css index 0757cdb..fdb79de 100644 --- a/static/deck.css +++ b/static/deck.css @@ -716,18 +716,20 @@ select { .dash-music .music .vol { min-width: 0; } .music[hidden], .music [hidden] { display: none; } /* .art.empty sets display: flex */ /* The game: its cover as tall as the card, platform glyph, name, times. */ -.music.game:not([hidden]) { display: flex; gap: 16px; align-items: center; height: 100%; } -.music.game .cover { height: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; +/* contain: size, so the cover's own size never grows the card: it takes the card's height. */ +.music.game:not([hidden]) { display: flex; gap: 16px; align-items: center; height: 100%; contain: size; } +.music.game .cover { height: 100%; max-width: 45%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; flex: none; background: var(--udt-surface1); } -.music.game .cover.sq { aspect-ratio: 1; } +.music.game .cover.sq { aspect-ratio: 1; height: auto; width: 55%; max-width: 55%; } /* whole, not cropped to 2:3; 55% leaves the text room */ .music.game .cover.empty:not([hidden]) { display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--udt-overlay0); } -.music.game .meta { min-width: 0; display: flex; flex-direction: column; gap: 8px; } +.music.game .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; } .music.game .plat { font-size: 2.4rem; line-height: 1; color: var(--udt-accent); } .music.game .plat small { font-family: inherit; font-size: 1rem; font-weight: 700; margin-left: 2px; } .music.game .title { font-size: 1.3rem; font-weight: 600; white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } -.music.game .stat:not([hidden]) { display: flex; gap: 8px; align-items: center; color: var(--udt-subtext0); } +.music.game .stat:not([hidden]) { display: flex; gap: 8px; align-items: center; color: var(--udt-subtext0); + white-space: nowrap; } .music.game .stat .nf { color: var(--udt-accent); width: 1.2em; text-align: center; } .dash .prog { display: flex; flex-direction: column; gap: 6px; } |
