From f983e2206990127dd7438d6f45781a5655659ac8 Mon Sep 17 00:00:00 2001 From: Felix Koch Date: Mon, 4 Dec 2023 20:32:32 +0100 Subject: [PATCH] Fix Borders in Navbar-Button-Switches (#2070) * remove border & border-radius from .btn in .btn-switch-navbar. Use clipping instead * .btn-navbar is scoped to .btn-switch-navbar, using btn instead to improve readability --- evap/evaluation/templates/navbar.html | 6 +++--- evap/static/scss/_adjustments.scss | 10 ---------- evap/static/scss/components/_buttons.scss | 8 ++++---- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/evap/evaluation/templates/navbar.html b/evap/evaluation/templates/navbar.html index 17e653d959..5f6a7c49fa 100644 --- a/evap/evaluation/templates/navbar.html +++ b/evap/evaluation/templates/navbar.html @@ -92,7 +92,7 @@ {% csrf_token %} @@ -105,13 +105,13 @@
{% csrf_token %} -
{% csrf_token %} -
diff --git a/evap/static/scss/_adjustments.scss b/evap/static/scss/_adjustments.scss index 8d7064816d..dfd547da5c 100644 --- a/evap/static/scss/_adjustments.scss +++ b/evap/static/scss/_adjustments.scss @@ -77,16 +77,6 @@ body, .fixed-top, .fixed-bottom, .is-fixed, .sticky-top { } } -// make buttons in btn-groups usable in forms -.btn-switch-navbar .btn-group > :not(:last-child) > .btn { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.btn-switch-navbar .btn-group > :not(:first-child) > .btn { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} - // remove horizontal line after "add another" in formsets .dynamic-form-add td { border-bottom: none; diff --git a/evap/static/scss/components/_buttons.scss b/evap/static/scss/components/_buttons.scss index c7524789a9..31554a2fe8 100644 --- a/evap/static/scss/components/_buttons.scss +++ b/evap/static/scss/components/_buttons.scss @@ -110,16 +110,17 @@ a:not([href]):not(.disabled) { .btn-group { border: $darker-gray 1px solid; border-radius: 0.2rem; + overflow: hidden; - .btn-navbar { + .btn { + border: none; + border-radius: 0; padding: 0 0.25rem; background-color: tint-color($darker-gray, 10%); - border-width: 0; color: $light-gray; transition: none; min-width: 28px; margin-left: 0; - border-radius: 0.15rem; &:hover { background-color: tint-color($darker-gray, 20%); @@ -129,7 +130,6 @@ a:not([href]):not(.disabled) { &.active { background-color: tint-color($darker-gray, 10%); color: $medium-gray; - border-width: 0; box-shadow: inset 0 0 10px shade-color($darker-gray, 40%); opacity: 1; }