From b2c628a3bf00b1bdeff8b6478a7487c4417ac934 Mon Sep 17 00:00:00 2001 From: Sam McAlilly Date: Wed, 17 Nov 2021 09:33:13 -0600 Subject: [PATCH 1/2] fix sticky button bug --- .../static/bootstrap/scss/utilities/_position.scss | 8 ++++++++ bga_database/static/css/bootstrap-overrides.css | 10 +++++++++- templates/jinja2/department.html | 2 +- templates/jinja2/unit.html | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/bga_database/static/bootstrap/scss/utilities/_position.scss b/bga_database/static/bootstrap/scss/utilities/_position.scss index 9ecdeeb9..9c87251b 100755 --- a/bga_database/static/bootstrap/scss/utilities/_position.scss +++ b/bga_database/static/bootstrap/scss/utilities/_position.scss @@ -35,3 +35,11 @@ $positions: static, relative, absolute, fixed, sticky; z-index: $zindex-sticky; } } + +.sticky-top-button { + @supports (position: sticky) { + position: sticky; + top: 55px; + z-index: $zindex-sticky; + } +} diff --git a/bga_database/static/css/bootstrap-overrides.css b/bga_database/static/css/bootstrap-overrides.css index 5a87f643..060030a7 100644 --- a/bga_database/static/css/bootstrap-overrides.css +++ b/bga_database/static/css/bootstrap-overrides.css @@ -5249,7 +5249,15 @@ button.bg-dark:focus { .sticky-top { position: sticky; top: 0; - z-index: 1020; } } + z-index: 1020; + } + + .sticky-top-button { + position: sticky; + top: 55px; + z-index: 1020; + } +} .sr-only { position: absolute; diff --git a/templates/jinja2/department.html b/templates/jinja2/department.html index c51cb01b..11a06ef3 100644 --- a/templates/jinja2/department.html +++ b/templates/jinja2/department.html @@ -19,7 +19,7 @@ -
+
{% include 'partials/year_selector.html' %}
diff --git a/templates/jinja2/unit.html b/templates/jinja2/unit.html index 0f9538e7..d75af8d5 100644 --- a/templates/jinja2/unit.html +++ b/templates/jinja2/unit.html @@ -19,7 +19,7 @@
-
+
{% include 'partials/year_selector.html' %}
From d41957b8f2e49d251d73ec2d8a29db64f3b81044 Mon Sep 17 00:00:00 2001 From: Sam McAlilly Date: Wed, 17 Nov 2021 10:16:15 -0600 Subject: [PATCH 2/2] better css organization --- .../static/bootstrap/scss/utilities/_position.scss | 8 -------- bga_database/static/css/bootstrap-overrides.css | 6 ------ bga_database/static/css/custom.css | 8 ++++++++ 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/bga_database/static/bootstrap/scss/utilities/_position.scss b/bga_database/static/bootstrap/scss/utilities/_position.scss index 9c87251b..9ecdeeb9 100755 --- a/bga_database/static/bootstrap/scss/utilities/_position.scss +++ b/bga_database/static/bootstrap/scss/utilities/_position.scss @@ -35,11 +35,3 @@ $positions: static, relative, absolute, fixed, sticky; z-index: $zindex-sticky; } } - -.sticky-top-button { - @supports (position: sticky) { - position: sticky; - top: 55px; - z-index: $zindex-sticky; - } -} diff --git a/bga_database/static/css/bootstrap-overrides.css b/bga_database/static/css/bootstrap-overrides.css index 060030a7..cdaf7107 100644 --- a/bga_database/static/css/bootstrap-overrides.css +++ b/bga_database/static/css/bootstrap-overrides.css @@ -5251,12 +5251,6 @@ button.bg-dark:focus { top: 0; z-index: 1020; } - - .sticky-top-button { - position: sticky; - top: 55px; - z-index: 1020; - } } .sr-only { diff --git a/bga_database/static/css/custom.css b/bga_database/static/css/custom.css index 63ea32b5..880a3c76 100644 --- a/bga_database/static/css/custom.css +++ b/bga_database/static/css/custom.css @@ -255,3 +255,11 @@ h5 { #story-feed-stories h5 > a { color: unset; } + +@supports (position: sticky) { + .sticky-top-button { + position: sticky; + top: 55px; + z-index: 1020; + } +}