mediawiki-extensions-Cite/modules/ve-cite/ve.ui.MWReferenceResultWidget.less
WMDE-Fisch 73917d493b [refactor] Move result items rendering to ReferenceResultWidget
The exact rendering of each item should be part of the widget.
This also allows a better application of the sub-ref indent.

Bug: T375841
Change-Id: Ic2c24f40d59f41b316c6d6f362726c1ee68f2102
2024-09-29 20:06:02 +02:00

67 lines
1.7 KiB
Plaintext

/*!
* VisualEditor MediaWiki UserInterface MWReferenceResultWidget styles.
*
* @copyright 2011-2018 VisualEditor Team's Cite sub-team and others; see AUTHORS.txt
* @license MIT
*/
@import 'mediawiki.skin.variables.less';
.ve-ui-mwReferenceResultWidget {
padding: 1em;
// Limit extremely large references to not overflow the dialog
max-height: 12em;
overflow: hidden;
border-bottom: @border-width-base @border-style-base @border-color-muted;
// Class applied only to subrefs
&-sub .oo-ui-labelElement-label {
margin-left: 2em;
}
&:last-child {
border-bottom: 0;
}
&.oo-ui-optionWidget-highlighted {
// OOUI's SearchWidget doesn't come with a style for this, so we copy MenuOptionWidget
background-color: @background-color-interactive;
color: @color-emphasized;
}
&.oo-ui-labelElement .oo-ui-labelElement-label {
white-space: normal;
// Ignore clicks on e.g. <a> elements that are part of the reference's text
pointer-events: none;
word-wrap: break-word;
}
// How the footnote marker appears in the text, e.g. [1]
&-footnote {
float: left;
margin-right: 0.75em;
}
// A reference's unique identifier as provided via the name="…" attribute
&-name {
opacity: @opacity-medium;
float: right;
margin-left: 0.75em;
margin-bottom: 0.05em;
// Limit overly long names and push them to the side
max-width: 40%;
text-align: right;
// Names like ":0" are less meaningful, still useful esp. when switching to wikitext
&-autogenerated {
opacity: @opacity-low;
}
}
// Preview the reference's content with less whitespace, relevant when it contains e.g. tables
.ve-ui-mwPreviewElement * {
margin-bottom: 0;
margin-top: 0;
}
}