From 3f806669c6a1af890a6c51212de96a4efddd71e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 20 Oct 2026 14:16:01 +0200 Subject: [PATCH] fix: show scrollbars only when an inner area overflows --- assets/styles/app.css | 12 ++++++++++++ assets/styles/components/timeline.css | 2 +- .../_partials/_assignment_info_compact.html.twig | 2 +- templates/admin/index.html.twig | 10 +++++----- templates/forms.html.twig | 2 +- templates/htmx_modal.html.twig | 2 +- templates/layout.html.twig | 2 +- templates/manager/index.html.twig | 6 +++--- 8 files changed, 25 insertions(+), 13 deletions(-) diff --git a/assets/styles/app.css b/assets/styles/app.css index a69df1e..e236087 100644 --- a/assets/styles/app.css +++ b/assets/styles/app.css @@ -32,3 +32,15 @@ cursor: pointer; } } + +/* + * Thin scrollbars without a track for inner scrolling areas. The page scrollbar takes its + * style from , which body * leaves out. Firefox and Chrome/Edge 121+ honour these; + * Safari keeps its own overlay scrollbars. + */ +@layer base { + body * { + scrollbar-width: thin; + scrollbar-color: var(--color-gray-300) transparent; + } +} diff --git a/assets/styles/components/timeline.css b/assets/styles/components/timeline.css index 5713880..02b0255 100644 --- a/assets/styles/components/timeline.css +++ b/assets/styles/components/timeline.css @@ -1,4 +1,4 @@ .scroll-container { - @apply overflow-scroll; + @apply overflow-auto; max-height: calc(100vh - 320px); } diff --git a/templates/_partials/_assignment_info_compact.html.twig b/templates/_partials/_assignment_info_compact.html.twig index df68eca..b9d988b 100644 --- a/templates/_partials/_assignment_info_compact.html.twig +++ b/templates/_partials/_assignment_info_compact.html.twig @@ -4,7 +4,7 @@
Jobprofil
-
+
{{ assignment.jobProfile.name }} {% if assignment.jobProfileInfo %}
diff --git a/templates/admin/index.html.twig b/templates/admin/index.html.twig index 9c62b3f..801a635 100644 --- a/templates/admin/index.html.twig +++ b/templates/admin/index.html.twig @@ -61,7 +61,7 @@ {{ newContractsCount }} neu, {{ pendingContractsCount }} in Bearbeitung {% endif %} -
+
    {% for document in newContracts %} {% set assignment = document.disposition.assignment %} @@ -95,7 +95,7 @@ {{ newInvoicesCount }} neu, {{ pendingInvoicesCount }} in Bearbeitung {% endif %} -
    +
      {% for document in newInvoices %} {% set assignment = document.disposition.assignment %} @@ -128,7 +128,7 @@ {{ newDriverLicensesCount }} neu {% endif %} -
      +
        {% for document in newDriverLicenses %}
      • @@ -242,7 +242,7 @@ {{ overdueFeedbacksCount }} überfällig {% endif %} -
        +
          {% for disposition in overdueFeedbacks %} {% set assignment = disposition.assignment %} @@ -278,7 +278,7 @@ {{ overdueContractsCount }} überfällig {% endif %} -
          +
            {% for disposition in overdueContracts %} {% set assignment = disposition.assignment %} diff --git a/templates/forms.html.twig b/templates/forms.html.twig index cc718d5..3c54232 100644 --- a/templates/forms.html.twig +++ b/templates/forms.html.twig @@ -269,7 +269,7 @@
            {{ icon('dots', 'w-4 h-4 mt-2') }}
          -