File: referencePreview.less

package info (click to toggle)
mediawiki 1%3A1.43.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 417,464 kB
  • sloc: php: 1,062,949; javascript: 664,290; sql: 9,714; python: 5,458; xml: 3,489; sh: 1,131; makefile: 64
file content (93 lines) | stat: -rw-r--r-- 2,220 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
@import 'mediawiki.skin.variables.less';

// Should be in sync with Popups/src/ui/variables.less
@popupPadding: 16px;
@lineHeight: 20px;

/* stylelint-disable selector-class-pattern */
.popups-icon--reference-generic {
	.cdx-mixin-css-icon( @cdx-icon-reference );
}

.popups-icon--reference-book {
	.cdx-mixin-css-icon( @cdx-icon-book );
}

.popups-icon--reference-journal {
	.cdx-mixin-css-icon( @cdx-icon-journal );
}

.popups-icon--reference-news {
	.cdx-mixin-css-icon( @cdx-icon-newspaper );
}

.popups-icon--reference-web {
	.cdx-mixin-css-icon( @cdx-icon-browser );
}

.popups-icon--preview-disambiguation {
	.cdx-mixin-css-icon( @cdx-icon-articles );
}

// Don't do any event bubbling on childs like <a><span>[</span>2]</a>
// see https://phabricator.wikimedia.org/T214693
/* stylelint-disable-next-line selector-max-id */
#mw-content-text .reference a[ href*='#' ] * {
	pointer-events: none;
}

.mwe-popups.mwe-popups-type-reference .mwe-popups-container {
	.mwe-popups-title .popups-icon--reference-note {
		// There is currently no "reference-note" icon specified in extension.json
		display: none;
	}

	.mwe-popups-extract {
		margin-right: 0;
		max-height: inherit;

		.mwe-popups-scroll {
			// This is how the @previewFooterHeight in popup.less is calculated
			@marginBottom: @popupPadding + 34px;
			// Same as @previewPointerHeight in popup.less
			@pointerHeight: 8px;
			max-height: 401px - @popupPadding - @marginBottom + @pointerHeight;
			overflow: auto;
			padding-right: @popupPadding;
		}

		.mw-parser-output {
			overflow-wrap: break-word;
		}

		// Remove the default fade-out effect set by popup.less
		&::after {
			display: none;
		}

		.mwe-popups-fade {
			position: absolute;
			width: 100%;
			height: @lineHeight;
			background-color: transparent;
			background-image: linear-gradient( rgba( 255, 255, 255, 0 ), rgba( 255, 255, 255, 1 ) );
			opacity: 0;
			pointer-events: none; // Allows clicking "through" the element
			transition: opacity 250ms ease;
		}

		&.mwe-popups-fade-out .mwe-popups-fade {
			opacity: 1;
		}
	}

	.mwe-collapsible-placeholder {
		font-weight: bold;
		margin: 1em 0;
		position: relative;
	}

	.mw-reference-previews-parent {
		margin-bottom: 1em;
	}
}