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