mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
14d87b1e04
Adding a submenu to the results of the reference re-use search. This allows the user to either create a direct reuse or a reuse with different details. Hide the menu when there's a sub-reference. Known Issues: - Ref name is hidden (conditionally when our feature is enabled) as a quick fix to not having a good layout choice yet. - Submenu is clipped at the dialog bounds. - Submenu highlight should vanish when the submenu is closed - Instrument action with metrics. Bug: T375053 Change-Id: I3eddd6bad328aaf9bb99eb2783ba66d4e08f862d
85 lines
2.1 KiB
Plaintext
85 lines
2.1 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;
|
|
}
|
|
}
|
|
|
|
// FIXME: T375053 Should just be temporary to test some UI changes
|
|
.ve-ui-mwReferenceSearchReuseHacks .ve-ui-mwReferenceResultWidget {
|
|
display: flex;
|
|
|
|
.ve-ui-mwReferenceResultsReuseOptions .oo-ui-buttonElement-button:hover {
|
|
border: @border-progressive;
|
|
}
|
|
|
|
.oo-ui-labelElement-label {
|
|
flex-grow: 1;
|
|
}
|
|
|
|
// FIXME: Waiting on a design that accomodates the ref name.
|
|
.ve-ui-mwReferenceResultWidget-name {
|
|
display: none;
|
|
}
|
|
}
|