File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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.
Original file line number Diff line number Diff line change 878878
879879 .home {
880880 display : grid ;
881- grid-template-columns : minmax (0 , 1 fr ) minmax (0 , 1 fr );
881+ grid-template-columns : minmax (0 , 9 fr ) minmax (0 , 11 fr );
882882 grid-template-rows : auto 1fr ;
883883 gap : 0 clamp (40px , 5vw , 80px );
884884 flex : 1 ;
926926 }
927927
928928 .home :global(.total-time-display .play-btn ) {
929- width : clamp (80 px , 10 vw , 160 px );
929+ width : clamp (88 px , 11 vw , 176 px );
930930 }
931931
932932 .home :global(.total-time-display .time ) {
933- flex : 1 ;
934- min-width : 0 ;
935- font-size : clamp ( 7 rem , 12 vw , 20 rem ) ;
933+ flex : none ;
934+ font-size : clamp ( 7.7 rem , 13.2 vw , 22 rem ) ;
935+ text-align : center ;
936936 }
937937
938938 .toolbar :global(svg ) {
10021002
10031003 .home :global(.total-time-display .row ) {
10041004 justify-content : center ;
1005- gap : 20 px ;
1005+ gap : 16 px ;
10061006 }
10071007
10081008 .home :global(.total-time-display .play-btn ) {
1009- width : min (10 vw , 5rem );
1009+ width : min (8 vw , 4. 5rem );
10101010 }
10111011
10121012 .home :global(.total-time-display .time ) {
1013- flex : 1 ;
1014- min-width : 0 ;
1015- font-size : min ( 13 vw , 7 rem ) ;
1013+ flex : none ;
1014+ font-size : min ( 15 vw , 8 rem ) ;
1015+ text-align : center ;
10161016 }
10171017 }
10181018 </style >
You can’t perform that action at this time.
0 commit comments