Template:Reflist/styles.css: Difference between revisions

m 1 revision imported
Update to reduce differences in behavior between {{reflist}} and <references/>. See talk. Note, if this breaks some custom styles you have, likely they were already broken with <references/> and you should take this opportunity to update them.
Line 1: Line 1:
/* {{pp|small=yes}} */
/* {{pp|small=yes}} */
/* can we remove the font size declarations? .references gets a font-size in
* common.css that is always 90, and there is nothing else in reflist out in
* the wild. May affect column sizes.
*/
.reflist {
font-size: 90%;            /* Default font-size */
margin-bottom: 0.5em;
list-style-type: decimal;
}
.reflist .references {
font-size: 100%;          /* Reset font-size when nested in div.reflist */
margin-bottom: 0;          /* Avoid double margin when nested in div.reflist */
list-style-type: inherit;  /* Enable custom list style types */
}
/* columns-2 and columns-3 are legacy for "2 or more" column view from when the
/* columns-2 and columns-3 are legacy for "2 or more" column view from when the
  * template was implemented with column-count.
  * template was implemented with column-count.
Line 22: Line 6:
column-width: 30em;
column-width: 30em;
}
}
.reflist-columns-3 {
.reflist-columns-3 {
column-width: 25em;
column-width: 25em;
}
/* Match Vector 2022 after [[gerrit:1185300]]. */
body.skin-vector-2022 .reflist-columns-2 {
column-width: 27em;
}
body.skin-vector-2022 .reflist-columns-3 {
column-width: 22.5em;
}
/* These should probably be moved to MediaWiki:Common.css to work with <references> as well. */
.references[data-mw-group=upper-alpha] {
list-style-type: upper-alpha;
}
.references[data-mw-group=upper-roman] {
list-style-type: upper-roman;
}
}


/* Reset top margin for lists embedded in columns */
.references[data-mw-group=lower-alpha] {
.reflist-columns {
list-style-type: lower-alpha;
margin-top: 0.3em;
}
}


.reflist-columns ol {
.references[data-mw-group=lower-greek] {
margin-top: 0;
list-style-type: lower-greek;
}
}


/* Avoid elements breaking between columns */
.references[data-mw-group=lower-roman] {
.reflist-columns li {
list-style-type: lower-roman;
page-break-inside: avoid; /* Removed from CSS in favor of break-inside c. 2020 */
break-inside: avoid-column;
}
}


.reflist-upper-alpha {
/* Liststyle param. */
div.reflist-liststyle-upper-alpha .references {
list-style-type: upper-alpha;
list-style-type: upper-alpha;
}
}


.reflist-upper-roman {
div.reflist-liststyle-upper-roman .references {
list-style-type: upper-roman;
list-style-type: upper-roman;
}
}


.reflist-lower-alpha {
div.reflist-liststyle-lower-alpha .references {
list-style-type: lower-alpha;
list-style-type: lower-alpha;
}
}


.reflist-lower-greek {
div.reflist-liststyle-lower-greek .references {
list-style-type: lower-greek;
list-style-type: lower-greek;
}
}


.reflist-lower-roman {
div.reflist-liststyle-lower-roman .references {
list-style-type: lower-roman;
list-style-type: lower-roman;
}
}