Skip to content

Commit e16cb5c

Browse files
johnmathewsclaude
andcommitted
Fix total time layout in landscape and desktop modes
Remove flex: 1 from .time so the play button and total time form a tight centered group instead of being spread apart. Increase font sizes, adjust desktop grid to 45/55 split, and scale desktop play+time up 10%. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 194aaf6 commit e16cb5c

2 files changed

Lines changed: 38 additions & 10 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Fix total time positioning in landscape and desktop layouts
2+
3+
## What changed
4+
5+
The total time display on the home screen had an awkward layout in landscape
6+
(mobile) and desktop modes: a large gap between the play button and the total
7+
time text, with the time pushed to the far right edge and rendered too small.
8+
9+
### Root cause
10+
11+
`.time` had `flex: 1` which made it expand to fill all remaining row space,
12+
and the inherited `text-align: right` pushed the text to the far edge of
13+
that expanded container.
14+
15+
### Fix
16+
17+
**Landscape mobile** (`orientation: landscape, max-height: 500px`):
18+
- `.time`: `flex: 1` -> `flex: none` (content width, not full row)
19+
- Font size increased: `min(13vw, 7rem)` -> `min(15vw, 8rem)`
20+
- Added `text-align: center`
21+
- Play button slightly smaller, row gap tightened
22+
23+
**Desktop** (`min-width: 1024px`):
24+
- Same `flex: none` + `text-align: center` fix
25+
- Grid columns changed from 50/50 to 45/55 (cards / total-time)
26+
- Play button and time both scaled up 10%
27+
28+
The play button and total time are now a tight centered group in both layouts.

src/routes/+page.svelte

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@
878878
879879
.home {
880880
display: grid;
881-
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
881+
grid-template-columns: minmax(0, 9fr) minmax(0, 11fr);
882882
grid-template-rows: auto 1fr;
883883
gap: 0 clamp(40px, 5vw, 80px);
884884
flex: 1;
@@ -926,13 +926,13 @@
926926
}
927927
928928
.home :global(.total-time-display .play-btn) {
929-
width: clamp(80px, 10vw, 160px);
929+
width: clamp(88px, 11vw, 176px);
930930
}
931931
932932
.home :global(.total-time-display .time) {
933-
flex: 1;
934-
min-width: 0;
935-
font-size: clamp(7rem, 12vw, 20rem);
933+
flex: none;
934+
font-size: clamp(7.7rem, 13.2vw, 22rem);
935+
text-align: center;
936936
}
937937
938938
.toolbar :global(svg) {
@@ -1002,17 +1002,17 @@
10021002
10031003
.home :global(.total-time-display .row) {
10041004
justify-content: center;
1005-
gap: 20px;
1005+
gap: 16px;
10061006
}
10071007
10081008
.home :global(.total-time-display .play-btn) {
1009-
width: min(10vw, 5rem);
1009+
width: min(8vw, 4.5rem);
10101010
}
10111011
10121012
.home :global(.total-time-display .time) {
1013-
flex: 1;
1014-
min-width: 0;
1015-
font-size: min(13vw, 7rem);
1013+
flex: none;
1014+
font-size: min(15vw, 8rem);
1015+
text-align: center;
10161016
}
10171017
}
10181018
</style>

0 commit comments

Comments
 (0)