mediawiki-extensions-Cite/modules/ext.cite.styles.css
Steven Rawson fdf17f326f Cite: Move margin in column references
In Vector, Timeless, and Monobook ("desktop"), there is a 0.3em margin applied to <ol>. When in
columns, this causes the first column to be offset from any others vertically. This change moves
the margin from the references <ol> (i.e., sets the list margin-top to 0) to the enclosing div
(sets the div margin-top to 0.3em) when the div has the columns class. This approach is currently
employed by some wikis such as en.wp for their {{reflist}} template.

Minerva doesn't seem to have the relevant top margin.

Bug: T249441
Change-Id: I3eeb3fe9fd690cd8f74df5541b3ef5e10eeed123
2021-02-08 21:56:39 +00:00

97 lines
2.3 KiB
CSS

.mw-cite-backlink,
.cite-accessibility-label {
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
.mw-references-columns {
-webkit-column-width: 30em;
-moz-column-width: 30em;
column-width: 30em;
margin-top: 0.3em;
}
/* Lines first column up nicely. */
.mw-parser-output .mw-references-columns .references {
margin-top: 0;
}
/* Avoid elements from breaking between columns */
.mw-references-columns li {
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid-column;
}
ol.references {
/* Resetting *any* counter on an <ol> element messes the build-in numbering in Firefox up.
Explicitely resetting the build-in "list-item" counter fixes this. */
counter-reset: mw-ref-extends-parent list-item;
}
ol.references > li {
counter-increment: mw-ref-extends-parent;
counter-reset: mw-ref-extends-child;
}
ol.references .mw-extended-references {
list-style: none;
margin-left: 2em;
}
.mw-extended-references > li:before {
counter-increment: mw-ref-extends-child;
content: counter( mw-ref-extends-parent, decimal ) '.' counter( mw-ref-extends-child, decimal ) '. ';
}
sup.reference {
/* Isolation to fix references in case of RTL words at the end of a reference */
unicode-bidi: -moz-isolate;
unicode-bidi: -webkit-isolate;
unicode-bidi: isolate;
/* Don't allow a reference that includes a group name
to break in the end of the line */
white-space: nowrap;
/* Do not inherit bold or italic */
font-weight: normal;
font-style: normal;
}
/* Highlight clicked reference in blue to help navigation */
ol.references li:target,
sup.reference:target {
background-color: #eaf3ff;
}
/* Make cite errors "strong" */
.mw-ext-cite-error {
font-weight: bold;
/* For the case that the error is embedded in an element with a different direction */
unicode-bidi: embed;
}
.mw-ext-cite-error code {
/* As code is inheriting `#f8f9fa` as background color from `code`,
we need to increase contrast, by setting it to `transparent`. See T247903. */
background-color: transparent;
color: inherit;
/* Reduce inherited `padding` to make code fit in better in Resources list. */
padding: 1px 2px;
}
/* @noflip */
.mw-cite-dir-ltr .reference-text {
direction: ltr;
unicode-bidi: embed;
}
/* @noflip */
.mw-cite-dir-rtl .reference-text {
direction: rtl;
unicode-bidi: embed;
}