From 18139a8d4a215c55b3f4031434c20adc4074ef78 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 17 Jun 2020 16:34:50 +0000 Subject: [PATCH] Bug 25727: (follow-up) Use CSS specificity rather than !important This patch adds specificty to the CSS which controls the "invalid" appearance of a Select2 dropdown so that the use of "!important" can be avoided. The patch also puts this style into our custom select2 CSS file so that it is located with other Select2 style changes. Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- koha-tmpl/intranet-tmpl/prog/css/select2.css | 11 ++++------- .../intranet-tmpl/prog/css/src/staff-global.scss | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/select2.css b/koha-tmpl/intranet-tmpl/prog/css/select2.css index c9550fd..a6d22c2 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/select2.css +++ b/koha-tmpl/intranet-tmpl/prog/css/select2.css @@ -2,11 +2,8 @@ background-color: initial; } -.select2-container.subfield_not_filled .select2-choice { - background: initial; - background-color : #FFFF99; +.select2-container.missing .select2-choice, +.select2-container .select2-selection--single.subfield_not_filled, +.select2-container .select2-selection--single.important_subfield_not_filled { + background-color: #FFFF99; } - -.select2-container.missing .select2-choice { - background: #ffc none; -} \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index ca9b74d..64f79cd 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -1552,11 +1552,11 @@ input[type='text']:read-only:focus { } .subfield_not_filled { - background-color: #FFFF99 !important; + background-color: #FFFF99; } .important_subfield_not_filled { - background-color : #FFFFCC !important; + background-color : #FFFFCC; } .content_hidden { -- 1.7.2.5