| 1 |
/*! |
| 2 |
* VisualEditor MediaWiki UserInterface MWReferenceResultWidget styles. |
| 3 |
* |
| 4 |
* @copyright 2011-2018 VisualEditor Team's Cite sub-team and others; see AUTHORS.txt |
| 5 |
* @license MIT |
| 6 |
*/ |
| 7 |
|
| 8 |
@import 'mediawiki.skin.variables.less'; |
| 9 |
|
| 10 |
.ve-ui-mwReferenceResultWidget { |
| 11 |
padding: 1em; |
| 12 |
// Limit extremely large references to not overflow the dialog |
| 13 |
max-height: 12em; |
| 14 |
overflow: hidden; |
| 15 |
border-bottom: @border-width-base @border-style-base @border-color-muted; |
| 16 |
|
| 17 |
// Class applied only to subrefs |
| 18 |
&-sub .oo-ui-labelElement-label { |
| 19 |
margin-left: 2em; |
| 20 |
} |
| 21 |
|
| 22 |
&:last-child { |
| 23 |
border-bottom: 0; |
| 24 |
} |
| 25 |
|
| 26 |
&.oo-ui-optionWidget-highlighted { |
| 27 |
// OOUI's SearchWidget doesn't come with a style for this, so we copy MenuOptionWidget |
| 28 |
background-color: @background-color-interactive; |
| 29 |
color: @color-emphasized; |
| 30 |
} |
| 31 |
|
| 32 |
&.oo-ui-labelElement .oo-ui-labelElement-label { |
| 33 |
white-space: normal; |
| 34 |
// Ignore clicks on e.g. <a> elements that are part of the reference's text |
| 35 |
pointer-events: none; |
| 36 |
word-wrap: break-word; |
| 37 |
} |
| 38 |
|
| 39 |
// How the footnote marker appears in the text, e.g. [1] |
| 40 |
&-footnote { |
| 41 |
float: left; |
| 42 |
margin-right: 0.75em; |
| 43 |
} |
| 44 |
|
| 45 |
// A reference's unique identifier as provided via the name="…" attribute |
| 46 |
&-name { |
| 47 |
opacity: @opacity-medium; |
| 48 |
float: right; |
| 49 |
margin-left: 0.75em; |
| 50 |
margin-bottom: 0.05em; |
| 51 |
// Limit overly long names and push them to the side |
| 52 |
max-width: 40%; |
| 53 |
text-align: right; |
| 54 |
|
| 55 |
// Names like ":0" are less meaningful, still useful esp. when switching to wikitext |
| 56 |
&-autogenerated { |
| 57 |
opacity: @opacity-low; |
| 58 |
} |
| 59 |
} |
| 60 |
|
| 61 |
// Preview the reference's content with less whitespace, relevant when it contains e.g. tables |
| 62 |
.ve-ui-mwPreviewElement * { |
| 63 |
margin-bottom: 0; |
| 64 |
margin-top: 0; |
| 65 |
} |
| 66 |
} |
| 67 |
|
| 68 |
.ve-ui-mwReferenceResultsReuseOptionsItem .oo-ui-menuOptionWidget > .oo-ui-labelElement-label { |
| 69 |
white-space: initial; |
| 70 |
} |
| 71 |
|
| 72 |
// FIXME: T375053 Should just be temporary to test some UI changes |
| 73 |
.ve-ui-mwReferenceSearchReuseHacks .ve-ui-mwReferenceResultWidget { |
| 74 |
display: flex; |
| 75 |
|
| 76 |
.ve-ui-mwReferenceResultsReuseOptions { |
| 77 |
height: 100%; |
| 78 |
|
| 79 |
.oo-ui-buttonElement-button:hover { |
| 80 |
border: @border-progressive; |
| 81 |
} |
| 82 |
} |
| 83 |
|
| 84 |
.oo-ui-labelElement-label { |
| 85 |
flex-grow: 1; |
| 86 |
} |
| 87 |
|
| 88 |
// FIXME: Waiting on a design that accomodates the ref name. |
| 89 |
.ve-ui-mwReferenceResultWidget-name { |
| 90 |
display: none; |
| 91 |
} |
| 92 |
} |