Merge "Soft deprecate Title::getUserCaseDBKey()"
[lhc/web/wiklou.git] / resources / src / mediawiki.rcfilters / styles / mw.rcfilters.less
1 @import 'mediawiki.mixins.animation';
2 @import 'mediawiki.ui/variables';
3 @import 'mw.rcfilters.mixins';
4
5 @rcfilters-spinner-size: 12px;
6 @rcfilters-head-min-height: 210px;
7 @rcfilters-head-margin-bottom: 20px;
8 @rcfilters-wl-head-min-height: 295px;
9 @rcfilters-head-min-height-collapsed: 130px;
10 @rcfilters-wl-head-min-height-collapsed: 220px;
11
12 // Corrections for the standard special page
13 .client-js {
14 .cloptions {
15 border: 0;
16 }
17
18 // Reserve space for the UI while it loads
19 .rcfilters-head {
20 min-height: @rcfilters-head-min-height;
21 margin-bottom: @rcfilters-head-margin-bottom;
22 }
23
24 // On the watchlist, reserve a bit more
25 .mw-special-Watchlist .rcfilters-head {
26 min-height: @rcfilters-wl-head-min-height;
27 }
28
29 .mw-rcfilters-collapsed {
30 .rcfilters-head {
31 min-height: @rcfilters-head-min-height-collapsed;
32 }
33
34 // On the watchlist, reserve a bit more
35 &.mw-special-Watchlist .rcfilters-head {
36 min-height: @rcfilters-wl-head-min-height-collapsed;
37 }
38 }
39
40 .mw-recentchanges-toplinks {
41 padding-left: 0.5em;
42
43 &:not( .mw-recentchanges-toplinks-collapsed ) {
44 margin-top: -1px; // Make up for `border` to prevent link movement
45 margin-left: -1px;
46 margin-bottom: 0.5em;
47 border: 1px solid @colorGray12; // Same as the legend
48 padding: 0 0.5em 0.5em 0.5em;
49 }
50
51 /* stylelint-disable declaration-no-important */
52 .oo-ui-buttonElement > .oo-ui-buttonElement-button {
53 padding-right: 1.2em !important;
54
55 > .oo-ui-indicatorElement-indicator {
56 right: 0 !important;
57 width: 0.9375em !important;
58 }
59 }
60 /* stylelint-enable declaration-no-important */
61 }
62
63 body:not( .mw-rcfilters-ui-initialized ) {
64 .mw-recentchanges-toplinks.mw-recentchanges-toplinks-collapsed {
65 // Similar to the watchlist-details hack, we are going to make this float left
66 // while loading to prevent jumpiness in the min-height calculation
67 float: left;
68
69 .mw-recentchanges-toplinks-content {
70 display: none;
71 }
72 }
73
74 .rcfilters-head {
75 opacity: 0.5;
76 pointer-events: none;
77
78 .cloptions {
79 display: none;
80 }
81 }
82 }
83
84 .mw-rcfilters-ui-highlights {
85 display: none;
86 }
87
88 .mw-changeslist {
89 // Reserve space for the highlight circles
90 ul,
91 table.mw-enhanced-rc {
92 .result-circle-margin();
93 }
94 }
95
96 // Temporarily hide the empty results section while we load rcfilters.
97 .mw-changeslist-empty {
98 display: none;
99 }
100
101 .errorbox {
102 display: none;
103 }
104
105 body.mw-rcfilters-ui-loading .mw-changeslist {
106 opacity: 0.5;
107 }
108
109 .rcfilters-spinner {
110 display: none;
111 position: absolute;
112 left: 50%;
113 // Make sure the middle of the spinner is centered, rather than its left edge
114 margin-left: -3 * @rcfilters-spinner-size / 2;
115 white-space: nowrap;
116
117 & .rcfilters-spinner-bounce,
118 &:before,
119 &:after {
120 content: '';
121 background-color: @colorGray7;
122 display: block;
123 float: left;
124 width: @rcfilters-spinner-size;
125 height: @rcfilters-spinner-size;
126 border-radius: 100%;
127 .animation( rcfiltersBouncedelay 1600ms ease-in-out -160ms infinite both );
128 }
129
130 &:before {
131 margin-right: 4px;
132 .animation-delay( -330ms );
133 }
134
135 &:after {
136 margin-left: 4px;
137 .animation-delay( 0s );
138 }
139 }
140
141 body:not( .mw-rcfilters-ui-initialized ) .rcfilters-spinner {
142 display: block;
143 // When initializing, display the spinner on top of the area where the UI will appear
144 margin-top: -( @rcfilters-head-min-height + @rcfilters-head-margin-bottom ) / 1.5;
145 }
146
147 body.mw-rcfilters-ui-loading .rcfilters-spinner {
148 display: block;
149 // When loading new results, display the spinner on top of the results area
150 margin-top: -( @rcfilters-head-min-height + @rcfilters-head-margin-bottom ) / 8;
151 }
152
153 #contentSub,
154 form#mw-watchlist-resetbutton {
155 display: none;
156 }
157
158 // Why does rcfilters have a copy of this?
159 // TODO: Remove per T195256.
160 #jump-to-nav {
161 margin-top: -0.5em;
162 margin-bottom: 0.5em;
163 }
164
165 // Make the watchlist-details message display while loading, but make it not take up any
166 // space. This makes the min-height trick work better.
167 .watchlistDetails {
168 float: left;
169 // The 20em should match the min-width we are setting up
170 // for the .mw-rcfilters-ui-watchlistTopSectionWidget-editWatchlistButton
171 // in mw.rcfilters.ui.WatchlistTopSectionWidget.less
172 width: ~'calc( 100% - 20em )';
173 }
174 }
175
176 .mw-rcfilters-staticfilters-selected {
177 font-weight: bold;
178 }
179
180 @-webkit-keyframes rcfiltersBouncedelay {
181 0%,
182 50%, // equals 800ms
183 100% {
184 -webkit-transform: scale( 0.625 );
185 }
186
187 20% { // equals 320ms
188 opacity: 0.87;
189 -webkit-transform: scale( 1 );
190 }
191 }
192
193 @-moz-keyframes rcfiltersBouncedelay {
194 0%,
195 50%,
196 100% {
197 -moz-transform: scale( 0.625 );
198 }
199
200 20% {
201 opacity: 0.87;
202 -moz-transform: scale( 1 );
203 }
204 }
205
206 @keyframes rcfiltersBouncedelay {
207 0%,
208 50%,
209 100% {
210 transform: scale( 0.625 );
211 }
212
213 20% { // equals 320ms
214 opacity: 0.87;
215 transform: scale( 1 );
216 }
217 }