cca / koha_snippets

code to be pasted into Koha's admin side
https://library.cca.edu
Other
4 stars 0 forks source link

multiple 520 summaries tag look awkward because label repeats #21

Closed phette23 closed 4 years ago

phette23 commented 4 years ago

I hate how the "summary" label repeats for each MARC 520, see on Metaphysics : a very short introduction for instance:

Screen Shot 2020-05-17 at 18 23 13

Unfortunately, CSS doesn't solve this because of the way the -of-type selectors work. You'd think either of these might work:

.results_summary.summary:nth-of-type(n + 2) .label { display: none; }
/* or */
.results_summary.summary .label { display: none; }
.results_summary.summary:first-of-type .label { display: inline; }

They don't because the "type" being referred to is not element that match the selector being modified, but sibling elements. So without counting all the earlier .results_summary elements make it impossible to target the few summaries at the end, unless I'm missing something.