diff --git a/client/components/main/header.css b/client/components/main/header.css index f1c794d96a..735007feb1 100644 --- a/client/components/main/header.css +++ b/client/components/main/header.css @@ -94,6 +94,15 @@ margin-top: 1px; margin-inline-end: 10px; } +/* Board view: on windows too narrow for the button text labels (Private, Muted, + Sort, Multi-Selection, ...) to fit on one line, show ICONS ONLY — keeping the + board title and the buttons — instead of the labels wrapping to a second row. + The star count (a small number, not a text label) stays. */ +@media screen and (max-width: 1200px) { + #header #header-main-bar .board-header-btn i.fa + span:not(.board-star-counter) { + display: none; + } +} #header #header-main-bar .board-header-btn .board-header-btn-close { float: inline-end; } diff --git a/tests/headerHamburger.test.cjs b/tests/headerHamburger.test.cjs index a18f19e13e..d3af1ffe91 100644 --- a/tests/headerHamburger.test.cjs +++ b/tests/headerHamburger.test.cjs @@ -60,4 +60,11 @@ test('the hamburger lives in the right group in the board header', () => { assert.ok(rightAt !== -1 && hamburgerAt > rightAt, 'js-toggle-sidebar is inside the .right group'); }); +test('narrow board header hides button text labels (icons only), keeps star count', () => { + // A media query hides the .board-header-btn text spans on narrow windows so they + // do not wrap to a second row; the star count is excluded. + assert.ok(/@media[^{]*max-width:\s*1200px[\s\S]*?board-header-btn i\.fa \+ span:not\(\.board-star-counter\)\s*{\s*display:\s*none/.test(css), + 'button texts hidden under a max-width media query, star count kept'); +}); + console.log(`\nAll ${passed} header-hamburger tests passed`);