From 92c7e697a323edecd0512e02d6a23cb7f6349f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Fri, 23 Oct 2026 17:00:40 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20visibility=20label=20st?= =?UTF-8?q?ays=20on=20one=20line=20and=20profile=20tabs=20fit=20phone=20wi?= =?UTF-8?q?dth?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The selected visibility segment keeps its icon and word in one row, centred on the pill, with the word unable to wrap. The pill no longer shrinks beside the Create button, so the two share a height and a vertical centre. The profile tab row runs to the screen edges below 899px like the repo tabs, snaps as it scrolls, and tightens its padding on phones so Packages is not clipped. --- style/_repo.scss | 11 ++++++++++- style/main.scss | 30 ++++++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/style/_repo.scss b/style/_repo.scss index a39f84c..2cc2220 100644 --- a/style/_repo.scss +++ b/style/_repo.scss @@ -589,17 +589,24 @@ border: 0; // Same height as the Create button beside it. + // The pill keeps its size beside the Create button; it never shrinks to fit the header. .segmented { + flex: none; height: var(--control-h); } // A drawer: the selected segment is the pill and opens its word beside the icon. The other // segment stays icon only. The highlight sits on the segment, so the icon is inside it. The - // selectors repeat .segmented to outrank the shared pill rules in main.scss. + // selectors repeat .segmented to outrank the shared pill rules in main.scss. The icon and the + // word share one row, centred on the pill's middle, and the word never wraps. .segmented .segment { + display: inline-flex; + flex-direction: row; + align-items: center; height: calc(var(--control-h) - 6px); padding: 0 9px; border-radius: var(--radius-full); + white-space: nowrap; transition: background-color 0.2s ease, box-shadow 0.2s ease; > svg { @@ -610,6 +617,7 @@ > span { display: inline-flex; + flex: none; align-items: center; box-sizing: border-box; width: auto; @@ -619,6 +627,7 @@ overflow: hidden; font-size: 0.8125rem; line-height: 1; + white-space: nowrap; opacity: 0; transition: max-width 0.25s ease, padding 0.25s ease, opacity 0.2s ease; } diff --git a/style/main.scss b/style/main.scss index 0219fd1..94f3298 100644 --- a/style/main.scss +++ b/style/main.scss @@ -2026,8 +2026,9 @@ code { margin-top: 12px; } -// Profile tabs: a horizontal underline strip under the header, at every width. Reuses the -// `.tab` and `.tab-count` looks; the sidebar rules for `.repo-tabs` do not apply here. +// Profile tabs: a horizontal underline strip under the header. Reuses the `.tab` and `.tab-count` +// looks; the sidebar rules for `.repo-tabs` do not apply here. Below the sidebar breakpoint the +// strip runs to the screen edges, as `.repo-tabs` does, and the tabs snap as they scroll. .profile-tabs { display: flex; gap: 4px; @@ -2035,11 +2036,36 @@ code { margin: 0; overflow-x: auto; overflow-y: hidden; + scroll-snap-type: x proximity; scrollbar-width: none; &::-webkit-scrollbar { display: none; } + + > .tab { + scroll-snap-align: start; + } +} + +@media (max-width: 899px) { + .profile-tabs { + margin-left: -16px; + margin-right: -16px; + padding: 0 16px; + scroll-padding: 0 16px; + } +} + +// Phones: the four tabs fit the screen width with tighter padding, so Packages is not cut off. +@media (max-width: 480px) { + .profile-tabs { + gap: 0; + + > .tab { + padding: 8px 8px; + } + } } // Pagers: Previous, "Page X of Y", Next in one row.