|
| 1 | +:root { |
| 2 | + --settings-control-height: 32px; |
| 3 | +} |
| 4 | + |
1 | 5 | /* ── Settings design language ────────────────────────────────────────────── |
2 | 6 | * |
3 | 7 | * One structural pattern for every settings surface: |
|
180 | 184 |
|
181 | 185 | .settings-row__control { |
182 | 186 | display: flex; |
183 | | - flex-wrap: wrap; |
| 187 | + /* No wrap here: Chromium sizes a wrappable shrink-to-fit flex container to |
| 188 | + its widest item, collapsing multi-control clusters. The <=640px block |
| 189 | + gives the cluster a definite width and enables wrapping there. */ |
184 | 190 | align-items: center; |
185 | 191 | justify-content: flex-end; |
186 | 192 | gap: var(--space-2); |
187 | | - flex: 0 1 auto; |
| 193 | + flex: 0 0 auto; |
188 | 194 | min-width: 0; |
189 | 195 | max-width: 60%; |
190 | 196 | } |
|
275 | 281 |
|
276 | 282 | /* ── Controls ── */ |
277 | 283 |
|
| 284 | +/* One control height inside settings clusters. Buttons, inputs, selects, and |
| 285 | + segmented controls share 32px so mixed rows never show ragged heights. |
| 286 | + Multi-select list boxes and textareas keep their natural height. */ |
| 287 | +.settings-row__control .btn, |
| 288 | +.settings-section__actions .btn, |
| 289 | +.settings-group .data-table-search input, |
| 290 | +input.settings-input, |
| 291 | +select.settings-select:not([multiple]) { |
| 292 | + height: var(--settings-control-height); |
| 293 | + padding-block: 0; |
| 294 | + box-sizing: border-box; |
| 295 | +} |
| 296 | + |
| 297 | +/* Segmented keeps its 2px track inset; the buttons fill the inner height. |
| 298 | + min-height (not height) so many-option enums can still wrap to two lines. */ |
| 299 | +.settings-segmented { |
| 300 | + min-height: var(--settings-control-height); |
| 301 | + box-sizing: border-box; |
| 302 | + align-items: stretch; |
| 303 | +} |
| 304 | + |
| 305 | +.settings-segmented > .settings-segmented__btn { |
| 306 | + display: inline-flex; |
| 307 | + align-items: center; |
| 308 | + padding-block: 0; |
| 309 | +} |
| 310 | + |
| 311 | +.settings-row__control .btn--icon, |
| 312 | +.settings-section__actions .btn--icon { |
| 313 | + width: var(--settings-control-height); |
| 314 | + min-width: var(--settings-control-height); |
| 315 | + padding-inline: 0; |
| 316 | +} |
| 317 | + |
278 | 318 | .settings-toggle { |
279 | 319 | display: inline-flex; |
280 | 320 | align-items: center; |
@@ -526,6 +566,9 @@ textarea.settings-input { |
526 | 566 | } |
527 | 567 |
|
528 | 568 | .settings-row__control { |
| 569 | + /* Definite width makes flex-wrap size lines correctly (see desktop note). */ |
| 570 | + width: 100%; |
529 | 571 | max-width: 100%; |
| 572 | + flex-wrap: wrap; |
530 | 573 | } |
531 | 574 | } |
0 commit comments