From fe9a3bc2bc772f2e83ce8e1afa0622d1663e2811 Mon Sep 17 00:00:00 2001 From: Dorian Merz <merz@ub.uni-leipzig.de> Date: Thu, 15 Apr 2021 10:46:20 +0200 Subject: [PATCH] refs #19648 [fid_bbi] fix some scss, follows #18965 --- themes/fid_bbi/scss/blocks/dropdown-menu.scss | 49 +++++++++++++++++ themes/fid_bbi/scss/compiled.scss | 1 + themes/fid_bbi/scss/util/hacks.scss | 53 ++----------------- 3 files changed, 55 insertions(+), 48 deletions(-) create mode 100644 themes/fid_bbi/scss/blocks/dropdown-menu.scss diff --git a/themes/fid_bbi/scss/blocks/dropdown-menu.scss b/themes/fid_bbi/scss/blocks/dropdown-menu.scss new file mode 100644 index 00000000000..2fd1b83cba6 --- /dev/null +++ b/themes/fid_bbi/scss/blocks/dropdown-menu.scss @@ -0,0 +1,49 @@ +.dropdown-menu { + background: $white; + box-shadow: 0 0 0 2px $text-color inset; + display: none; + list-style: none; + margin-top: g(.25); + padding: g(.5) g(.75); + position: absolute; + z-index: 9; + width: auto; + + &.-right { + margin-top: g(.25 + 1.75); // only for record "Export" + right: 0; + } + + // Set by JS + .open > & { + display: block; + } + + // TODO: Use code above from a.active + &::before { + background: $white; + content: ''; + display: block; + position: absolute; + width: 12px; + height: 12px; + border-left: 2px solid; + border-top: 2px solid; + top: -5.5px; // align with top + transform: rotate(45deg); + } + + &.-right::before { + right: g(); + } + + > li { + &::before { + content: none; + } + + + li { + margin-top: g(.25); + } + } +} diff --git a/themes/fid_bbi/scss/compiled.scss b/themes/fid_bbi/scss/compiled.scss index 100aebd6f2a..1fd737b2fa6 100644 --- a/themes/fid_bbi/scss/compiled.scss +++ b/themes/fid_bbi/scss/compiled.scss @@ -29,6 +29,7 @@ @import 'blocks/browse'; @import 'blocks/button'; @import 'blocks/container'; +@import 'blocks/dropdown-menu'; @import 'blocks/dbis'; @import 'blocks/facet'; @import 'blocks/filters'; diff --git a/themes/fid_bbi/scss/util/hacks.scss b/themes/fid_bbi/scss/util/hacks.scss index b71abf44a97..343c1fdf837 100644 --- a/themes/fid_bbi/scss/util/hacks.scss +++ b/themes/fid_bbi/scss/util/hacks.scss @@ -34,54 +34,6 @@ a.active { display: block; } -.dropdown-menu { - background: $white; - box-shadow: 0 0 0 2px $text-color inset; - display: none; - list-style: none; - margin-top: g(.25); - padding: g(.5) g(.75); - position: absolute; - z-index: 9; - - &.-right { - margin-top: g(.25 + 1.75); // only for record "Export" - right: 0; - } - - .open > & { - display: block; - } - - // TODO: Use code above from a.active - &::before { - background: $white; - content: ''; - display: block; - position: absolute; - width: 12px; - height: 12px; - border-left: 2px solid; - border-top: 2px solid; - top: -5.5px; // align with top - transform: rotate(45deg); - } - - &.-right::before { - right: g(); - } - - > li { - &::before { - content: none; - } - - + li { - margin-top: g(.25); - } - } -} - // Last row of forms, containing a "cancel" link and the submit button .form-group:last-child > .col-lg-11 { width: 100%; @@ -174,3 +126,8 @@ a.active { .resolver-links { margin-bottom: g(.5); } + +// NOTE: Must come last to override other classes +.hidden { + display: none; +} -- GitLab