Skip to content

Commit fa327e2

Browse files
Coderruvnet
andcommitted
fix: remove horizontal scrollbars, use overflow-x: hidden instead
No horizontal scrolling on mobile - content must fit viewport. Changed overflow-x: auto to overflow-x: hidden on all card containers. Added word-break: break-word to ensure text wraps naturally. Added mobile-specific text wrapping for meta values. Added overflow handling to section-card header and body elements. Co-Authored-By: claude-flow <ruv@ruv.net>
1 parent bc73d80 commit fa327e2

2 files changed

Lines changed: 25 additions & 4 deletions

File tree

SonosControl.Web/Shared/SectionCard.razor.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88
background-color: var(--surface-1);
99
box-shadow: var(--shadow-xs);
1010
min-width: 0;
11-
overflow-x: auto;
11+
overflow-x: hidden;
12+
word-break: break-word;
1213
}
1314

1415
.section-card__header {
1516
display: flex;
1617
align-items: flex-start;
1718
justify-content: space-between;
1819
gap: var(--spacing-md);
20+
min-width: 0;
21+
overflow-x: hidden;
1922
}
2023

2124
.section-card__header-main {
@@ -29,10 +32,16 @@
2932
line-height: 1;
3033
}
3134

35+
.section-card__header-text {
36+
min-width: 0;
37+
overflow-x: hidden;
38+
}
39+
3240
.section-card__header-text h3 {
3341
margin: 0;
3442
font-size: var(--font-size-xl);
3543
color: var(--text-primary);
44+
overflow-wrap: break-word;
3645
}
3746

3847
.section-card__eyebrow {
@@ -59,6 +68,8 @@
5968
display: flex;
6069
flex-direction: column;
6170
gap: var(--spacing-md);
71+
min-width: 0;
72+
overflow-x: hidden;
6273
}
6374

6475
@media (max-width: 768px) {

SonosControl.Web/wwwroot/css/site.css

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ a:focus-visible {
207207
padding-top: var(--spacing-lg);
208208
padding-bottom: var(--spacing-xl);
209209
min-width: 0;
210-
overflow-x: auto;
210+
overflow-x: hidden;
211211
}
212212

213213
.card, .panel {
@@ -216,7 +216,8 @@ a:focus-visible {
216216
border-radius: var(--bs-border-radius-lg);
217217
box-shadow: var(--shadow-sm);
218218
min-width: 0;
219-
overflow-x: auto;
219+
overflow-x: hidden;
220+
word-break: break-word;
220221
}
221222

222223
.card-header, .panel-header {
@@ -582,6 +583,7 @@ a:focus-visible {
582583
.currently-playing-card .card-body {
583584
min-width: 0;
584585
overflow-wrap: break-word;
586+
overflow-x: hidden;
585587
}
586588

587589
.currently-playing-card::before {
@@ -661,6 +663,14 @@ a:focus-visible {
661663
white-space: nowrap;
662664
overflow: hidden;
663665
text-overflow: ellipsis;
666+
min-width: 0;
667+
}
668+
669+
@media (max-width: 576px) {
670+
.currently-playing-meta-value {
671+
white-space: normal;
672+
overflow-wrap: break-word;
673+
}
664674
}
665675

666676
.currently-playing-progress {
@@ -945,7 +955,7 @@ a:focus-visible {
945955
flex: 1;
946956
background: var(--surface-0);
947957
min-width: 0;
948-
overflow-x: auto;
958+
overflow-x: hidden;
949959
}
950960

951961
.nav-shell {

0 commit comments

Comments
 (0)