Debian Codegraph @

extensions/Cite/modules/ext.cite.referencePreviews/referencePreview.less

raw
1 @import 'mediawiki.skin.variables.less';
2
3 // Should be in sync with Popups/src/ui/variables.less
4 @popupPadding: 16px;
5 @lineHeight: 20px;
6
7 /* stylelint-disable selector-class-pattern */
8 .popups-icon--reference-generic {
9 .cdx-mixin-css-icon( @cdx-icon-reference );
10 }
11
12 .popups-icon--reference-book {
13 .cdx-mixin-css-icon( @cdx-icon-book );
14 }
15
16 .popups-icon--reference-journal {
17 .cdx-mixin-css-icon( @cdx-icon-journal );
18 }
19
20 .popups-icon--reference-news {
21 .cdx-mixin-css-icon( @cdx-icon-newspaper );
22 }
23
24 .popups-icon--reference-web {
25 .cdx-mixin-css-icon( @cdx-icon-browser );
26 }
27
28 .popups-icon--preview-disambiguation {
29 .cdx-mixin-css-icon( @cdx-icon-articles );
30 }
31
32 // Don't do any event bubbling on childs like <a><span>[</span>2]</a>
33 // see https://phabricator.wikimedia.org/T214693
34 /* stylelint-disable-next-line selector-max-id */
35 #mw-content-text .reference a[ href*='#' ] * {
36 pointer-events: none;
37 }
38
39 .mwe-popups.mwe-popups-type-reference .mwe-popups-container {
40 .mwe-popups-title .popups-icon--reference-note {
41 // There is currently no "reference-note" icon specified in extension.json
42 display: none;
43 }
44
45 .mwe-popups-extract {
46 margin-right: 0;
47 max-height: inherit;
48
49 .mwe-popups-scroll {
50 // This is how the @previewFooterHeight in popup.less is calculated
51 @marginBottom: @popupPadding + 34px;
52 // Same as @previewPointerHeight in popup.less
53 @pointerHeight: 8px;
54 max-height: 401px - @popupPadding - @marginBottom + @pointerHeight;
55 overflow: auto;
56 padding-right: @popupPadding;
57 }
58
59 .mw-parser-output {
60 overflow-wrap: break-word;
61 }
62
63 // Remove the default fade-out effect set by popup.less
64 &::after {
65 display: none;
66 }
67
68 .mwe-popups-fade {
69 position: absolute;
70 width: 100%;
71 height: @lineHeight;
72 background-color: transparent;
73 background-image: linear-gradient( rgba( 255, 255, 255, 0 ), rgba( 255, 255, 255, 1 ) );
74 opacity: 0;
75 pointer-events: none; // Allows clicking "through" the element
76 transition: opacity 250ms ease;
77 }
78
79 &.mwe-popups-fade-out .mwe-popups-fade {
80 opacity: 1;
81 }
82 }
83
84 .mwe-collapsible-placeholder {
85 font-weight: bold;
86 margin: 1em 0;
87 position: relative;
88 }
89
90 .mw-reference-previews-parent {
91 margin-bottom: 1em;
92 }
93 }