From 8f4c4d8267aed9da80b0dccad818160150ffc4c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Thu, 12 Nov 2026 11:41:46 +0100 Subject: [PATCH] fix: keep the tab rows from scrolling vertically --- assets/styles/_components.css | 18 ++++++++++++++++++ templates/_partials/_tabs.html.twig | 4 ++-- .../questionnaire/index.html.twig | 4 ++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/assets/styles/_components.css b/assets/styles/_components.css index fe2e729..40e7270 100644 --- a/assets/styles/_components.css +++ b/assets/styles/_components.css @@ -23,3 +23,21 @@ .section-title { @apply text-base font-semibold uppercase tracking-wide text-brand; } + +/* + * A row of tabs (_partials/_tabs.html.twig, the questionnaire list). The row scrolls sideways on + * narrow screens, which makes it a vertical scroll container too, so nothing may stick out below + * it: the base line is an inset shadow the tabs' underline paints over, not a border they would + * have to overlap with a negative margin. + */ +.tabs { + @apply flex overflow-x-auto shadow-[inset_0_-1px_0_var(--color-line)]; +} + +.tab { + @apply shrink-0 whitespace-nowrap border-b-4 border-transparent px-3 py-2 text-sm text-ink hover:text-brand; +} + +.tab--current { + @apply border-brand-bright font-bold text-brand; +} diff --git a/templates/_partials/_tabs.html.twig b/templates/_partials/_tabs.html.twig index 6faa68e..6028630 100644 --- a/templates/_partials/_tabs.html.twig +++ b/templates/_partials/_tabs.html.twig @@ -8,12 +8,12 @@ {% if back %} {{ include('_partials/_back_link.html.twig', { 'url': back.uri, 'label': back.label }) }} {% endif %} -