summaryrefslogtreecommitdiff
path: root/www/wiki/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
blob: d4ce55dcffb6fcc541a889f6956e5d466abe21e6 (plain)
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
@import 'mediawiki.mixins.animation';
@import 'mediawiki.ui/variables';
@import 'mw.rcfilters.mixins';

@rcfilters-spinner-size: 12px;
@rcfilters-head-min-height: 210px;
@rcfilters-head-margin-bottom: 20px;
@rcfilters-wl-head-min-height: 300px;

// Corrections for the standard special page
.client-js {
	.cloptions {
		border: 0;
	}

	// Reserve space for the UI while it loads
	.rcfilters-head {
		min-height: @rcfilters-head-min-height;
		margin-bottom: @rcfilters-head-margin-bottom;
	}

	// On the watchlist, reserve a bit more
	.mw-special-Watchlist .rcfilters-head {
		min-height: @rcfilters-wl-head-min-height;
	}

	.mw-recentchanges-toplinks {
		padding-left: 0.5em;

		&:not( .mw-recentchanges-toplinks-collapsed ) {
			margin-top: -1px; // Make up for `border` to prevent link movement
			margin-left: -1px;
			margin-bottom: 0.5em;
			border: 1px solid @colorGray12; // Same as the legend
			padding: 0 0.5em 0.5em 0.5em;
		}

		/* stylelint-disable declaration-no-important */
		.oo-ui-buttonElement > .oo-ui-buttonElement-button {
			padding-right: 1.2em !important;

			> .oo-ui-indicatorElement-indicator {
				right: 0 !important;
				width: 0.9375em !important;
			}
		}
		/* stylelint-enable declaration-no-important */
	}

	body:not( .mw-rcfilters-ui-initialized ) {
		.mw-recentchanges-toplinks.mw-recentchanges-toplinks-collapsed {
			// Similar to the watchlist-details hack, we are going to make this float left
			// while loading to prevent jumpiness in the min-height calculation
			float: left;

			.mw-recentchanges-toplinks-content {
				display: none;
			}
		}

		.rcfilters-head {
			opacity: 0.5;
			pointer-events: none;

			.cloptions {
				display: none;
			}

		}
	}

	.mw-changeslist {
		// Reserve space for the highlight circles
		ul,
		table.mw-enhanced-rc {
			.result-circle-margin();
		}
	}

	// Temporarily hide the empty results section while we load rcfilters.
	.mw-changeslist-empty {
		display: none;
	}

	.errorbox {
		display: none;
	}

	body.mw-rcfilters-ui-loading .mw-changeslist {
		opacity: 0.5;
	}

	.rcfilters-spinner {
		display: none;
		position: absolute;
		left: 50%;
		// Make sure the middle of the spinner is centered, rather than its left edge
		margin-left: -3 * @rcfilters-spinner-size / 2;

		opacity: 0.8;
		white-space: nowrap;

		& .rcfilters-spinner-bounce,
		&:before,
		&:after {
			content: '';
			display: inline-block;
			width: @rcfilters-spinner-size;
			height: @rcfilters-spinner-size;
			background-color: @colorGray12;
			border-radius: 100%;
			.animation( rcfiltersBouncedelay 1.5s ease-in-out -0.16s infinite both );
		}

		&:before {
			.animation-delay( -0.33s );
		}

		&:after {
			.animation-delay( 0s );
		}
	}
	body:not( .mw-rcfilters-ui-initialized ) .rcfilters-spinner {
		display: block;
		// When initializing, display the spinner on top of the area where the UI will appear
		margin-top: -( @rcfilters-head-min-height + @rcfilters-head-margin-bottom ) / 2;
	}
	body.mw-rcfilters-ui-loading .rcfilters-spinner {
		display: block;
		// When loading new results, display the spinner on top of the results area
		margin-top: 2em;
	}

	#contentSub,
	form#mw-watchlist-resetbutton {
		display: none;
	}

	#jump-to-nav {
		margin-top: -0.5em;
		margin-bottom: 0.5em;
	}

	// Make the watchlist-details message display while loading, but make it not take up any
	// space. This makes the min-height trick work better.
	.watchlistDetails {
		float: left;
	}
}

.mw-rcfilters-staticfilters-selected {
	font-weight: bold;
}

@-webkit-keyframes rcfiltersBouncedelay {
	0%,
	80%,
	100% {
		-webkit-transform: scale( 0.7 );
		transform: scale( 0.7 );
	}
	40% {
		background-color: @colorGray10;
		-webkit-transform: scale( 1 );
		transform: scale( 1 );
	}
}

@-moz-keyframes rcfiltersBouncedelay {
	0%,
	80%,
	100% {
		-moz-transform: scale( 0.7 );
		transform: scale( 0.7 );
	}
	40% {
		background-color: @colorGray10;
		-moz-transform: scale( 0.7 );
		transform: scale( 1 );
	}
}

@keyframes rcfiltersBouncedelay {
	0%,
	80%,
	100% {
		transform: scale( 0.7 );
	}
	40% {
		background-color: @colorGray10;
		transform: scale( 1 );
	}
}