Skip to content

Commit

Permalink
Bug 25727: (follow-up) Use CSS specificity rather than !important
Browse files Browse the repository at this point in the history
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 <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
  • Loading branch information
oleonard authored and joubu committed Aug 24, 2020
1 parent 424187b commit 18139a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
11 changes: 4 additions & 7 deletions koha-tmpl/intranet-tmpl/prog/css/select2.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 18139a8

Please sign in to comment.