| 1 |
@import 'mediawiki.skin.variables.less'; |
| 2 |
@import 'mediawiki.mixins.less'; |
| 3 |
|
| 4 |
/* stylelint-disable no-descending-specificity */ |
| 5 |
span[ data-mw-comment-start ] { |
| 6 |
// Give comment anchors a negative offset so we don't position |
| 7 |
// them right at the edge of the page when jumping to them. |
| 8 |
// Use margin rather than position to avoid Chrome bug (T317135). |
| 9 |
position: absolute; |
| 10 |
margin-top: -1em; |
| 11 |
} |
| 12 |
|
| 13 |
// stylelint-disable-next-line @stylistic/selector-list-comma-newline-after |
| 14 |
h1, h2, h3, h4, h5, h6 { |
| 15 |
span[ data-mw-comment-end ] { |
| 16 |
// Support: Safari |
| 17 |
// Markers at the end of a line and before an inline-block (e.g. edit icon) |
| 18 |
// can cause text to stop wrapping properly. (T298371) |
| 19 |
display: inline-block; |
| 20 |
} |
| 21 |
} |
| 22 |
|
| 23 |
.ext-discussiontools-init-replylink-buttons { |
| 24 |
user-select: none; |
| 25 |
display: none; |
| 26 |
|
| 27 |
// If a site has text-indent set on content, it would be inherited here and cause excessive padding |
| 28 |
text-indent: 0; |
| 29 |
// Keep all buttons on one line |
| 30 |
white-space: nowrap; |
| 31 |
|
| 32 |
// Add space before the buttons using actual spaces rather than margin, so that they may collapse |
| 33 |
// when the buttons wrap to a new line (T325416). |
| 34 |
&::before { |
| 35 |
// Must use character escapes to avoid CSS minifier messing up the spaces |
| 36 |
content: '\20\20'; |
| 37 |
white-space: pre-wrap; |
| 38 |
} |
| 39 |
|
| 40 |
.ext-discussiontools-replytool-enabled & { |
| 41 |
display: inline; |
| 42 |
|
| 43 |
.client-nojs & { |
| 44 |
display: none; |
| 45 |
} |
| 46 |
} |
| 47 |
|
| 48 |
// Archived talk section (T295553) |
| 49 |
.ext-discussiontools-replytool-enabled .mw-archivedtalk & { |
| 50 |
// stylelint-disable-next-line declaration-no-important |
| 51 |
display: none !important; |
| 52 |
} |
| 53 |
|
| 54 |
.ext-discussiontools-init-replylink { |
| 55 |
&-reply { |
| 56 |
cursor: pointer; |
| 57 |
} |
| 58 |
|
| 59 |
// Similar to mw-editsection-bracket |
| 60 |
&-bracket { |
| 61 |
color: @color-subtle; |
| 62 |
|
| 63 |
&:not( :last-child ) { |
| 64 |
.margin-inline( 0, 0.25em ); |
| 65 |
} |
| 66 |
|
| 67 |
&:last-child { |
| 68 |
.margin-inline( 0.25em, 0 ); |
| 69 |
} |
| 70 |
} |
| 71 |
} |
| 72 |
|
| 73 |
.ext-discussiontools-init-replylink-open & > .ext-discussiontools-init-replylink-reply { |
| 74 |
color: #72777d; |
| 75 |
pointer-events: none; |
| 76 |
} |
| 77 |
|
| 78 |
&.ext-discussiontools-init-replylink-active > .ext-discussiontools-init-replylink-reply { |
| 79 |
color: @color-base; |
| 80 |
text-decoration: none; |
| 81 |
} |
| 82 |
|
| 83 |
.ext-discussiontools-init-section-overflowMenuButton.oo-ui-widget-enabled > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon:not( .oo-ui-image-invert ) { |
| 84 |
opacity: 0.5; |
| 85 |
} |
| 86 |
|
| 87 |
// Flip the icon in LTR interface languages. Un-flip it in RTL. |
| 88 |
// TODO This should use a different icon, with the image itself flipped (T325664). |
| 89 |
// stylelint-disable-next-line selector-class-pattern |
| 90 |
body.ltr & .ext-discussiontools-init-replybutton .oo-ui-iconElement-icon.oo-ui-icon-share { |
| 91 |
transform: scaleX( -1 ); |
| 92 |
} |
| 93 |
|
| 94 |
@media print { |
| 95 |
// stylelint-disable-next-line declaration-no-important |
| 96 |
display: none !important; |
| 97 |
} |
| 98 |
} |
| 99 |
|
| 100 |
// Don't re-color :visited links that act as buttons (T319019) |
| 101 |
.ext-discussiontools-init-replylink-reply, |
| 102 |
.ext-discussiontools-init-section-subscribe-link { |
| 103 |
&:visited { |
| 104 |
color: @color-link; |
| 105 |
} |
| 106 |
} |
| 107 |
|
| 108 |
.ext-discussiontools-init-timestamplink { |
| 109 |
&, |
| 110 |
&:visited, |
| 111 |
&:active { |
| 112 |
color: @color-placeholder; |
| 113 |
} |
| 114 |
} |
| 115 |
|
| 116 |
.ext-discussiontools-init-noMarker { |
| 117 |
list-style: none; |
| 118 |
} |
| 119 |
|
| 120 |
.ext-discussiontools-init-highlight { |
| 121 |
position: absolute; |
| 122 |
pointer-events: none; |
| 123 |
opacity: 0; |
| 124 |
mix-blend-mode: darken; |
| 125 |
// Support: Safari |
| 126 |
// Safari doesn't blend this overlay with the text unless GPU rendering is forced. |
| 127 |
transform: translateZ( 0 ); |
| 128 |
|
| 129 |
@media screen { |
| 130 |
html.skin-theme-clientpref-night & { |
| 131 |
mix-blend-mode: lighten; |
| 132 |
} |
| 133 |
} |
| 134 |
|
| 135 |
@media screen and ( prefers-color-scheme: dark ) { |
| 136 |
html.skin-theme-clientpref-os & { |
| 137 |
mix-blend-mode: lighten; |
| 138 |
} |
| 139 |
} |
| 140 |
} |
| 141 |
|
| 142 |
.ext-discussiontools-init-highlight-fadein { |
| 143 |
opacity: 1; |
| 144 |
} |
| 145 |
|
| 146 |
.ext-discussiontools-init-highlight-fadeout { |
| 147 |
opacity: 0; |
| 148 |
transition: opacity 250ms ease-out; |
| 149 |
} |
| 150 |
|
| 151 |
.ext-discussiontools-init-publishedcomment { |
| 152 |
// T368086 |
| 153 |
background-color: @background-color-success-subtle; |
| 154 |
} |
| 155 |
|
| 156 |
.ext-discussiontools-init-targetcomment { |
| 157 |
// T368086 |
| 158 |
background-color: @background-color-progressive-subtle; |
| 159 |
} |
| 160 |
|
| 161 |
// Topic subscriptions (both kinds) |
| 162 |
/* stylelint-disable selector-max-id, selector-class-pattern */ |
| 163 |
#ca-dt-page-subscribe, |
| 164 |
.menu__item--page-actions-overflow-t-page-subscribe, |
| 165 |
.ext-discussiontools-init-section-subscribe, |
| 166 |
.ext-discussiontools-init-section-subscribeButton { |
| 167 |
// If JS is enabled, disable the buttons until it's loaded, so that users don't accidentally |
| 168 |
// navigate to the no-JS interface. |
| 169 |
// TODO: These clicks will be ignored, but ideally we would process them once ready (T183720). |
| 170 |
.client-js:not( .ext-discussiontools-init-ready ) & { |
| 171 |
pointer-events: none; |
| 172 |
} |
| 173 |
} |
| 174 |
/* stylelint-enable selector-max-id, selector-class-pattern */ |
| 175 |
|
| 176 |
.ext-discussiontools-visualenhancements-enabled .ext-discussiontools-init-section { |
| 177 |
// Introduce a block formatting context so that floated "subscribe" links/buttons |
| 178 |
// aren't affected by other floats (T327469). Most skins already include this rule |
| 179 |
// for headings, but we add the floating stuff outside of headings (since T314714). |
| 180 |
// https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context |
| 181 |
overflow: hidden; |
| 182 |
// Prevent squishing too much (T335823) |
| 183 |
min-width: 20em; |
| 184 |
|
| 185 |
.mw-mf& { |
| 186 |
// Prevent the overflow menu's focus ring from being clipped. |
| 187 |
// We have no floated links/buttons on mobile, so this is okay. |
| 188 |
overflow: visible; |
| 189 |
} |
| 190 |
} |
| 191 |
|
| 192 |
// Topic subscriptions (link) |
| 193 |
.ext-discussiontools-init-section-subscribe { |
| 194 |
display: none; |
| 195 |
|
| 196 |
.ext-discussiontools-topicsubscription-enabled & { |
| 197 |
display: block; |
| 198 |
} |
| 199 |
|
| 200 |
// Directional properties must be based on content direction. |
| 201 |
.mw-content-ltr &, |
| 202 |
.mw-content-rtl .mw-content-ltr & { |
| 203 |
/* @noflip */ |
| 204 |
float: right; |
| 205 |
} |
| 206 |
|
| 207 |
.mw-content-rtl &, |
| 208 |
.mw-content-ltr .mw-content-rtl & { |
| 209 |
/* @noflip */ |
| 210 |
float: left; |
| 211 |
} |
| 212 |
|
| 213 |
&.mw-editsection-like { |
| 214 |
-moz-user-select: none; |
| 215 |
-webkit-user-select: none; |
| 216 |
-ms-user-select: none; |
| 217 |
user-select: none; |
| 218 |
margin-top: 0.6em; |
| 219 |
// Restore line height after Ie2ef68f3d0d |
| 220 |
line-height: inherit; |
| 221 |
} |
| 222 |
|
| 223 |
.mw-mf & { |
| 224 |
// Subscribe button is used instead on mobile |
| 225 |
display: none; |
| 226 |
} |
| 227 |
|
| 228 |
// Similar to mw-editsection-bracket |
| 229 |
&-bracket { |
| 230 |
color: @color-subtle; |
| 231 |
|
| 232 |
&:first-child { |
| 233 |
.margin-inline( 0, 0.25em ); |
| 234 |
} |
| 235 |
|
| 236 |
&:last-child { |
| 237 |
.margin-inline( 0.25em, 0 ); |
| 238 |
} |
| 239 |
} |
| 240 |
|
| 241 |
&-link&-link-pending { |
| 242 |
color: #72777d; |
| 243 |
pointer-events: none; |
| 244 |
} |
| 245 |
|
| 246 |
@media print { |
| 247 |
// stylelint-disable-next-line declaration-no-important |
| 248 |
display: none !important; |
| 249 |
} |
| 250 |
} |
| 251 |
|
| 252 |
// Topic subscriptions (button) |
| 253 |
// Boost specificity by adding .oo-ui-buttonElement |
| 254 |
.ext-discussiontools-init-section-subscribeButton.oo-ui-buttonElement { |
| 255 |
display: none; |
| 256 |
|
| 257 |
> .oo-ui-buttonElement-button { |
| 258 |
font-weight: normal; |
| 259 |
} |
| 260 |
|
| 261 |
.ext-discussiontools-topicsubscription-enabled.ext-discussiontools-visualenhancements-enabled & { |
| 262 |
display: inline-block; |
| 263 |
} |
| 264 |
|
| 265 |
// Directional properties must be based on content direction. |
| 266 |
body:not( .mw-mf ) .mw-content-ltr &, |
| 267 |
body:not( .mw-mf ) .mw-content-rtl .mw-content-ltr & { |
| 268 |
/* @noflip */ |
| 269 |
float: right; |
| 270 |
/* @noflip */ |
| 271 |
// stylelint-disable-next-line declaration-no-important |
| 272 |
margin: -2px 0 0 1em !important; |
| 273 |
} |
| 274 |
|
| 275 |
body:not( .mw-mf ) .mw-content-rtl &, |
| 276 |
body:not( .mw-mf ) .mw-content-ltr .mw-content-rtl & { |
| 277 |
/* @noflip */ |
| 278 |
float: left; |
| 279 |
/* @noflip */ |
| 280 |
// stylelint-disable-next-line declaration-no-important |
| 281 |
margin: -2px 1em 0 0 !important; |
| 282 |
} |
| 283 |
|
| 284 |
@media print { |
| 285 |
// stylelint-disable-next-line declaration-no-important |
| 286 |
display: none !important; |
| 287 |
} |
| 288 |
} |
| 289 |
|
| 290 |
// Visual enhancements disabled |
| 291 |
.ext-discussiontools-init-section-bar, |
| 292 |
.ext-discussiontools-init-replybutton.oo-ui-buttonElement, |
| 293 |
.ext-discussiontools-init-pageframe-latestcomment, |
| 294 |
.ext-discussiontools-init-sidebar-meta { |
| 295 |
display: none; |
| 296 |
} |
| 297 |
|
| 298 |
.skin-vector-2022 { |
| 299 |
.ext-discussiontools-init-section-bar, |
| 300 |
.ext-discussiontools-init-replybutton.oo-ui-buttonElement, |
| 301 |
.ext-discussiontools-init-section-subscribe, |
| 302 |
.ext-discussiontools-init-section-subscribeButton { |
| 303 |
font-size: 0.875rem; |
| 304 |
} |
| 305 |
} |
| 306 |
|
| 307 |
.ext-discussiontools-init-pageframe-latestcomment { |
| 308 |
color: @color-subtle; |
| 309 |
} |
| 310 |
|
| 311 |
// Visual enhancements enabled |
| 312 |
// Reply sub-feature |
| 313 |
.ext-discussiontools-visualenhancements_reply-enabled { |
| 314 |
.ext-discussiontools-init-replylink-bracket, |
| 315 |
.ext-discussiontools-init-replylink-reply { |
| 316 |
display: none; |
| 317 |
} |
| 318 |
|
| 319 |
.ext-discussiontools-init-replybutton { |
| 320 |
display: inline-block; |
| 321 |
margin-right: 0; |
| 322 |
} |
| 323 |
|
| 324 |
&:not( .mw-mf ) .ext-discussiontools-init-replylink-buttons .oo-ui-buttonElement { |
| 325 |
// Slim height for inline placement. Minerva uses block placement. |
| 326 |
margin-top: -8px; |
| 327 |
margin-bottom: -8px; |
| 328 |
|
| 329 |
&:not( .oo-ui-iconElement ) > .oo-ui-buttonElement-button { |
| 330 |
padding: 4px 6px; |
| 331 |
} |
| 332 |
|
| 333 |
&.oo-ui-iconElement > .oo-ui-buttonElement-button { |
| 334 |
padding-top: 4px; |
| 335 |
padding-bottom: 4px; |
| 336 |
} |
| 337 |
|
| 338 |
&.oo-ui-buttonElement-frameless.oo-ui-labelElement:first-child { |
| 339 |
// Cancel out 6px padding (set above) and 1px border (set in OOUI) |
| 340 |
// to align the button text with surrounding text |
| 341 |
margin-left: -7px; |
| 342 |
} |
| 343 |
} |
| 344 |
|
| 345 |
// Use block placement for the reply buttons on mobile, to make them easier to tap. |
| 346 |
&.mw-mf .ext-discussiontools-init-replylink-buttons { |
| 347 |
display: block; |
| 348 |
|
| 349 |
&::before { |
| 350 |
// Remove the spaces that are used for inline placement (T325416), added at the top of this file. |
| 351 |
content: ''; |
| 352 |
} |
| 353 |
} |
| 354 |
} |
| 355 |
|
| 356 |
// Page frame sub-feature |
| 357 |
.ext-discussiontools-visualenhancements_pageframe-enabled { |
| 358 |
.mw-page-title-separator::after { |
| 359 |
content: ' '; |
| 360 |
} |
| 361 |
|
| 362 |
.ext-discussiontools-init-pageframe-latestcomment { |
| 363 |
display: block; |
| 364 |
word-wrap: break-word; |
| 365 |
} |
| 366 |
|
| 367 |
.ext-discussiontools-init-sidebar-meta { |
| 368 |
display: block; |
| 369 |
padding-bottom: 6px; |
| 370 |
color: @color-subtle; |
| 371 |
white-space: nowrap; |
| 372 |
} |
| 373 |
} |
| 374 |
|
| 375 |
// Main feature (topic containers) |
| 376 |
.mw-mf .ext-discussiontools-init-section { |
| 377 |
// Need to fix some styles on mobile even when the feature is not enabled |
| 378 |
display: flex; |
| 379 |
align-items: center; |
| 380 |
|
| 381 |
> h2 { |
| 382 |
flex-grow: 1; |
| 383 |
} |
| 384 |
} |
| 385 |
|
| 386 |
.ext-discussiontools-visualenhancements-enabled { |
| 387 |
h2.ext-discussiontools-ui-newTopic-sectionTitle { |
| 388 |
font-size: 1.5em; |
| 389 |
} |
| 390 |
|
| 391 |
// Boost specificity |
| 392 |
.ext-discussiontools-init-section.mw-heading2, |
| 393 |
.ext-discussiontools-init-section { |
| 394 |
margin: 36px 0 12px 0; |
| 395 |
padding: 10px 0 0 0; |
| 396 |
font-weight: bold; |
| 397 |
// stylelint-disable-next-line declaration-no-important |
| 398 |
font-family: sans-serif !important; |
| 399 |
// stylelint-disable-next-line declaration-no-important |
| 400 |
font-size: inherit !important; |
| 401 |
border: 0; |
| 402 |
border-top: @border-width-base @border-style-base @border-color-base; |
| 403 |
|
| 404 |
h2 { |
| 405 |
margin: 0; |
| 406 |
padding: 0; |
| 407 |
font-weight: bold; |
| 408 |
// stylelint-disable-next-line declaration-no-important |
| 409 |
font-family: sans-serif !important; |
| 410 |
font-size: 1.5em; |
| 411 |
border: 0; |
| 412 |
} |
| 413 |
|
| 414 |
// Hide old subscribe link |
| 415 |
&-subscribe { |
| 416 |
display: none; |
| 417 |
} |
| 418 |
|
| 419 |
&-bar { |
| 420 |
display: flex; |
| 421 |
// Use interface language direction (auto-flipped for RTL) |
| 422 |
direction: ltr; |
| 423 |
} |
| 424 |
|
| 425 |
&-metadata { |
| 426 |
display: flex; |
| 427 |
flex-wrap: wrap; |
| 428 |
} |
| 429 |
|
| 430 |
&-metaitem { |
| 431 |
font-weight: normal; |
| 432 |
color: @color-subtle; |
| 433 |
// Make same height as "unsubscribe" button |
| 434 |
margin: 7px 0; |
| 435 |
|
| 436 |
& + .ext-discussiontools-init-section-metaitem { |
| 437 |
margin-left: 12px; |
| 438 |
padding-left: 12px; |
| 439 |
border-left: @border-width-base @border-style-base @border-color-base; |
| 440 |
} |
| 441 |
} |
| 442 |
} |
| 443 |
|
| 444 |
// [Old Parser HTML] Hide the border-top (section divider) if: |
| 445 |
/* Our section heading is the first element on the page */ |
| 446 |
.mw-parser-output > .ext-discussiontools-init-section:first-child, |
| 447 |
/* Our section heading is the first element on the page, except for invisible TOC placeholder */ |
| 448 |
.mw-parser-output > meta:first-child + .ext-discussiontools-init-section, |
| 449 |
/* Our section heading directly follows a <h1> heading (which has border-bottom on most skins) */ |
| 450 |
h1 + .ext-discussiontools-init-section { |
| 451 |
border-top: 0; |
| 452 |
margin-top: 0; |
| 453 |
} |
| 454 |
|
| 455 |
// [Parsoid HTML] Hide the border-top (section divider) if: |
| 456 |
/* Our section heading is the first element on the page */ |
| 457 |
.mw-parser-output > section:first-child:empty + section > .ext-discussiontools-init-section, |
| 458 |
/* Our section heading directly follows a <h1> heading (which has border-bottom on most skins) */ |
| 459 |
h1 + section > .ext-discussiontools-init-section { |
| 460 |
border-top: 0; |
| 461 |
margin-top: 0; |
| 462 |
} |
| 463 |
|
| 464 |
// This needs to be a separate rule, because the :has() selector is not yet supported by all browsers |
| 465 |
// Support: Firefox <= 120, Chrome <= 105, Safari <= 15.3 (https://caniuse.com/css-has) |
| 466 |
/* Our section heading is the first element on the page, except for invisible TOC placeholder */ |
| 467 |
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */ |
| 468 |
.mw-parser-output > section:first-child:has( > meta:only-child ) + section > .ext-discussiontools-init-section { |
| 469 |
border-top: 0; |
| 470 |
margin-top: 0; |
| 471 |
} |
| 472 |
|
| 473 |
// Also re-style topic header input in new topic tool |
| 474 |
h2.ext-discussiontools-ui-newTopic-sectionTitle .oo-ui-inputWidget-input { |
| 475 |
font-weight: bold; |
| 476 |
font-family: sans-serif; |
| 477 |
} |
| 478 |
|
| 479 |
&.mw-mf h2.ext-discussiontools-ui-newTopic-sectionTitle { |
| 480 |
font-size: 1.125em; |
| 481 |
} |
| 482 |
|
| 483 |
// Mobile |
| 484 |
&.mw-mf .ext-discussiontools-init-section { |
| 485 |
flex-wrap: wrap; |
| 486 |
// stylelint-disable-next-line declaration-no-important |
| 487 |
align-items: flex-start !important; |
| 488 |
// stylelint-disable-next-line declaration-no-important |
| 489 |
border-bottom: 0 !important; |
| 490 |
margin: 5px 0 0 0; |
| 491 |
padding-bottom: 0; |
| 492 |
// The tap-highlight is an odd shape and shows even for cancelled events on -actions, |
| 493 |
// just hide it. |
| 494 |
-webkit-tap-highlight-color: transparent; |
| 495 |
border-top: @border-width-base @border-style-base @border-color-muted; |
| 496 |
|
| 497 |
h2 { |
| 498 |
width: auto; |
| 499 |
flex-grow: 1; |
| 500 |
// Needed to display multi-line headings correctly (because of flex-wrap on the parent, they |
| 501 |
// would be put on a line of their own otherwise) |
| 502 |
flex-basis: 0; |
| 503 |
/* T311612 */ |
| 504 |
font-size: 1.125em; |
| 505 |
} |
| 506 |
|
| 507 |
&-bar, |
| 508 |
&-overflowMenuButton { |
| 509 |
font-size: 0.875em; |
| 510 |
} |
| 511 |
|
| 512 |
&-overflowMenuButton { |
| 513 |
// Adjust for smaller headings |
| 514 |
margin-top: -4px; |
| 515 |
margin-bottom: -6px; |
| 516 |
} |
| 517 |
|
| 518 |
// stylelint-disable-next-line selector-class-pattern |
| 519 |
> .indicator { |
| 520 |
margin-top: 4px; |
| 521 |
} |
| 522 |
|
| 523 |
&:first-child { |
| 524 |
border-top: 0; |
| 525 |
} |
| 526 |
|
| 527 |
&-bar { |
| 528 |
width: 100%; |
| 529 |
flex-wrap: wrap; |
| 530 |
} |
| 531 |
|
| 532 |
&-actions, |
| 533 |
&-metadata { |
| 534 |
width: 100%; |
| 535 |
} |
| 536 |
|
| 537 |
.client-js & { |
| 538 |
&-actions, |
| 539 |
&-metadata { |
| 540 |
padding-left: 24px; |
| 541 |
|
| 542 |
@media print { |
| 543 |
padding-left: 0; |
| 544 |
} |
| 545 |
} |
| 546 |
|
| 547 |
&-overflowMenuButton { |
| 548 |
font-weight: normal; |
| 549 |
display: inline-block; |
| 550 |
margin-right: -5px; |
| 551 |
// Fix height so MenuWidget appears in the correct place with wrapped text (T311558) |
| 552 |
height: 32px; |
| 553 |
|
| 554 |
@media print { |
| 555 |
// stylelint-disable-next-line declaration-no-important |
| 556 |
display: none !important; |
| 557 |
} |
| 558 |
} |
| 559 |
|
| 560 |
.mw-editsection { |
| 561 |
// Replaced by the overflow menu |
| 562 |
// stylelint-disable-next-line declaration-no-important |
| 563 |
display: none !important; |
| 564 |
} |
| 565 |
} |
| 566 |
|
| 567 |
&-authorCountLabel, |
| 568 |
&-commentCountLabel { |
| 569 |
display: none; |
| 570 |
} |
| 571 |
|
| 572 |
// stylelint-disable-next-line selector-class-pattern |
| 573 |
&.section-heading .ext-discussiontools-init-section-actions { |
| 574 |
// Hidden until expanded |
| 575 |
display: none; |
| 576 |
} |
| 577 |
|
| 578 |
// stylelint-disable-next-line selector-class-pattern |
| 579 |
&.open-block { |
| 580 |
margin-bottom: 12px; |
| 581 |
|
| 582 |
.ext-discussiontools-init-section-actions { |
| 583 |
display: block; |
| 584 |
} |
| 585 |
} |
| 586 |
} |
| 587 |
|
| 588 |
&.mw-mf .ext-discussiontools-init-section-overflowMenu { |
| 589 |
// Not sure if this should have custom styles like this… |
| 590 |
// They were once accidentally inherited from the heading, |
| 591 |
// before the menu was moved to an overlay. |
| 592 |
font-weight: bold; |
| 593 |
font-size: 0.875em; |
| 594 |
} |
| 595 |
|
| 596 |
&.mw-mf .mf-section-0 + .ext-discussiontools-init-section { |
| 597 |
border-top: 0; |
| 598 |
margin-top: 0; |
| 599 |
} |
| 600 |
} |
| 601 |
|
| 602 |
.ext-discussiontools-emptystate { |
| 603 |
display: flex; |
| 604 |
justify-content: space-between; |
| 605 |
// Add space between this and any existing page content above, |
| 606 |
// or page-actions-menu in Minerva for non-existing pages |
| 607 |
margin-top: 1em; |
| 608 |
clear: both; |
| 609 |
|
| 610 |
> img { |
| 611 |
width: 250px; |
| 612 |
} |
| 613 |
|
| 614 |
&:not( :first-child ) { |
| 615 |
// Separate from existing (non-discussion) content |
| 616 |
margin-top: 2em; |
| 617 |
padding-top: 1em; |
| 618 |
border-top: @border-width-base @border-style-base @border-color-base; |
| 619 |
} |
| 620 |
} |
| 621 |
|
| 622 |
// Mobile |
| 623 |
@media ( max-width: 719px ) { |
| 624 |
.ext-discussiontools-emptystate { |
| 625 |
display: block; |
| 626 |
|
| 627 |
.oo-ui-buttonElement { |
| 628 |
display: block; |
| 629 |
text-align: center; |
| 630 |
|
| 631 |
> a { |
| 632 |
width: 80%; |
| 633 |
} |
| 634 |
} |
| 635 |
|
| 636 |
> img { |
| 637 |
display: none; |
| 638 |
} |
| 639 |
} |
| 640 |
} |
| 641 |
|
| 642 |
.ext-discussiontools-init-replylink-open { |
| 643 |
/* stylelint-disable selector-class-pattern */ |
| 644 |
.ext-discussiontools-emptystate, |
| 645 |
.mw-body-content > .cdx-message--warning { |
| 646 |
// Top level warnings, such as "User account --- is not registered" will re-apppear |
| 647 |
// in the new topic tool, so we can hide the original. (T289354#7312789) |
| 648 |
display: none; |
| 649 |
} |
| 650 |
/* stylelint-enable selector-class-pattern */ |
| 651 |
} |
| 652 |
|
| 653 |
.mw-mf.ext-discussiontools-emptystate-shown { |
| 654 |
// The mobile "Add topic" button is very eye-catching. |
| 655 |
// No need to show it when the empty state banner is shown. |
| 656 |
.ext-discussiontools-init-new-topic { |
| 657 |
display: none; |
| 658 |
} |
| 659 |
} |
| 660 |
|
| 661 |
// Styles inspired by the Popups extension |
| 662 |
// (and occasionally copypasted from there) |
| 663 |
.ext-discussiontools-autotopicsubpopup { |
| 664 |
position: absolute; |
| 665 |
left: 0; |
| 666 |
right: 0; |
| 667 |
|
| 668 |
// Increase specificity to override .oo-ui-popupWidget |
| 669 |
.oo-ui-popupWidget& { |
| 670 |
// Animations |
| 671 |
opacity: 0; |
| 672 |
// Support: Safari |
| 673 |
// 3D transform is needed to work around a Safari bug, which causes shadows to remain when the |
| 674 |
// popup is removed (T297266, T226872). Otherwise this should just use 2D translate(). |
| 675 |
transform: translate3d( 0, -20px, 0 ); |
| 676 |
transition: opacity 0.2s, transform 0.2s; |
| 677 |
|
| 678 |
&-fadein { |
| 679 |
opacity: 1; |
| 680 |
// Support: Safari |
| 681 |
// 3D transform is needed to work around a Safari bug, which causes shadows to remain when the |
| 682 |
// popup is removed (T297266, T226872). Otherwise this should just use 2D translate(). |
| 683 |
transform: translate3d( 0, 0, 0 ); |
| 684 |
} |
| 685 |
} |
| 686 |
|
| 687 |
.oo-ui-popupWidget-popup { |
| 688 |
padding: 1.5em; |
| 689 |
box-sizing: border-box; |
| 690 |
// Center horizontally |
| 691 |
position: absolute; |
| 692 |
left: 0; |
| 693 |
right: 0; |
| 694 |
margin: 0 auto; |
| 695 |
// Position above the highlight |
| 696 |
bottom: 3em; |
| 697 |
|
| 698 |
&.ext-discussiontools-autotopicsubpopup-overlap { |
| 699 |
// If there isn't enough space above, position on top of the highlight |
| 700 |
top: -1em; |
| 701 |
bottom: auto; |
| 702 |
} |
| 703 |
} |
| 704 |
|
| 705 |
&-title { |
| 706 |
font-weight: bold; |
| 707 |
font-size: 1.2em; |
| 708 |
display: block; |
| 709 |
} |
| 710 |
|
| 711 |
&-image { |
| 712 |
background: url( autotopicsubpopup-image.svg ) center center no-repeat; |
| 713 |
width: 200px; |
| 714 |
height: 200px; |
| 715 |
|
| 716 |
// Add dark mode images (T369834) |
| 717 |
@media screen { |
| 718 |
html.skin-theme-clientpref-night & { |
| 719 |
background-image: url( autotopicsubpopup-image-dark.svg ); |
| 720 |
} |
| 721 |
} |
| 722 |
|
| 723 |
@media screen and ( prefers-color-scheme: dark ) { |
| 724 |
html.skin-theme-clientpref-os & { |
| 725 |
background-image: url( autotopicsubpopup-image-dark.svg ); |
| 726 |
} |
| 727 |
} |
| 728 |
} |
| 729 |
|
| 730 |
// Desktop |
| 731 |
@media ( min-width: 720px ) { |
| 732 |
.oo-ui-popupWidget-popup { |
| 733 |
width: 450px; |
| 734 |
min-height: 200px; |
| 735 |
padding-right: 0; |
| 736 |
} |
| 737 |
|
| 738 |
&-image { |
| 739 |
position: absolute; |
| 740 |
top: 0; |
| 741 |
right: 0; |
| 742 |
height: 100%; |
| 743 |
z-index: 1; |
| 744 |
} |
| 745 |
|
| 746 |
&-body { |
| 747 |
margin-bottom: 1em; |
| 748 |
margin-top: 1em; |
| 749 |
margin-right: 200px; |
| 750 |
} |
| 751 |
|
| 752 |
&-title, |
| 753 |
&-actions { |
| 754 |
margin-right: 150px; |
| 755 |
position: relative; |
| 756 |
z-index: 2; |
| 757 |
} |
| 758 |
} |
| 759 |
|
| 760 |
// Mobile |
| 761 |
@media ( max-width: 719px ) { |
| 762 |
.oo-ui-popupWidget-popup { |
| 763 |
width: 320px; |
| 764 |
} |
| 765 |
|
| 766 |
&-image { |
| 767 |
width: 100%; |
| 768 |
} |
| 769 |
|
| 770 |
&-body { |
| 771 |
margin-bottom: 1em; |
| 772 |
} |
| 773 |
} |
| 774 |
} |
| 775 |
|
| 776 |
// DiscussionTools automatically enables most features on mobile. |
| 777 |
// When we detect that it's enabled, hide the lede section. |
| 778 |
// stylelint-disable-next-line selector-class-pattern |
| 779 |
.mw-mf.ns-talk.ext-discussiontools-replytool-enabled { |
| 780 |
&.ext-discussiontools-init-lede-hidden { |
| 781 |
// .mw-body-content selector prevents this applying to content in the preview (T318758) |
| 782 |
// On non-existent pages MobileFrontend wrapping isn't there |
| 783 |
.mw-body-content > .mw-talkpageheader, |
| 784 |
.mw-body-content > .mf-section-0, |
| 785 |
.mw-body-content > .mw-parser-output > .mf-section-0 { |
| 786 |
> *:not( .ext-discussiontools-emptystate ) { |
| 787 |
display: none; |
| 788 |
} |
| 789 |
|
| 790 |
> .ext-discussiontools-emptystate { |
| 791 |
border-top: 0; |
| 792 |
margin-top: 0; |
| 793 |
} |
| 794 |
} |
| 795 |
} |
| 796 |
|
| 797 |
// Always hide the table of content. This is usually hidden by the mf-section-0 rules, |
| 798 |
// but can sometimes appear elsewhere (e.g in the lede section overlay) |
| 799 |
// stylelint-disable-next-line selector-class-pattern |
| 800 |
.toc { |
| 801 |
display: none; |
| 802 |
} |
| 803 |
} |
| 804 |
|
| 805 |
.minerva-footer-button() { |
| 806 |
width: 100%; |
| 807 |
padding: 1em; |
| 808 |
box-sizing: content-box; |
| 809 |
color: @color-progressive; |
| 810 |
background: @background-color-interactive-subtle; |
| 811 |
border-top: @border-width-base @border-style-base @border-color-muted; |
| 812 |
text-align: center; |
| 813 |
|
| 814 |
// Match Minerva styles |
| 815 |
max-width: 993.3px; |
| 816 |
// stylelint-disable-next-line declaration-no-important |
| 817 |
margin-left: -16px !important; |
| 818 |
// stylelint-disable-next-line declaration-no-important |
| 819 |
margin-right: -16px !important; |
| 820 |
|
| 821 |
// Avoid smooshing with content / empty state (T320755) |
| 822 |
margin-top: 32px; |
| 823 |
// (it's not redundant longhand, some margins are !important and some aren't) |
| 824 |
// stylelint-disable-next-line declaration-block-no-redundant-longhand-properties |
| 825 |
margin-bottom: -32px; |
| 826 |
|
| 827 |
@media print { |
| 828 |
// stylelint-disable-next-line declaration-no-important |
| 829 |
display: none !important; |
| 830 |
} |
| 831 |
} |
| 832 |
|
| 833 |
.ext-discussiontools-init-new-topic { |
| 834 |
.minerva-footer-button(); |
| 835 |
position: sticky; |
| 836 |
// Required for IntersectionObserver trick |
| 837 |
bottom: -1px; |
| 838 |
transition: transform 250ms, opacity 250ms; |
| 839 |
transform: translateY( 100% ); |
| 840 |
opacity: 0; |
| 841 |
|
| 842 |
.ext-discussiontools-init-new-topic-open &, |
| 843 |
.ext-discussiontools-init-new-topic-opened &, |
| 844 |
.client-nojs & { |
| 845 |
transform: translateY( 0 ); |
| 846 |
opacity: 1; |
| 847 |
} |
| 848 |
|
| 849 |
.ext-discussiontools-init-new-topic-close & { |
| 850 |
transform: translateY( 100% ); |
| 851 |
opacity: 0; |
| 852 |
} |
| 853 |
|
| 854 |
.ext-discussiontools-init-new-topic-closed &, |
| 855 |
.ext-discussiontools-init-virtual-keyboard-open &, |
| 856 |
&-pinned { |
| 857 |
transform: translateY( 0 ); |
| 858 |
opacity: 1; |
| 859 |
position: static; |
| 860 |
transition: none; |
| 861 |
} |
| 862 |
|
| 863 |
.ext-discussiontools-init-replylink-open & { |
| 864 |
.ext-discussiontools-fake-disabled(); |
| 865 |
transform: translateY( 0 ); |
| 866 |
opacity: 1; |
| 867 |
position: static; |
| 868 |
} |
| 869 |
} |
| 870 |
|
| 871 |
// Tweak to prevent our footer buttons from overlapping Minerva skin elements (T328452). |
| 872 |
.client-nojs .ext-discussiontools-init-new-topic, |
| 873 |
.ext-discussiontools-init-new-topic-pinned.ext-discussiontools-init-button-notFlush { |
| 874 |
margin-bottom: 32px; |
| 875 |
} |
| 876 |
|
| 877 |
.ext-discussiontools-init-lede-button-container { |
| 878 |
margin: 0.5em 0; |
| 879 |
|
| 880 |
@media print { |
| 881 |
// stylelint-disable-next-line declaration-no-important |
| 882 |
display: none !important; |
| 883 |
} |
| 884 |
} |
| 885 |
|
| 886 |
// Boost specificity by adding .oo-ui-buttonElement |
| 887 |
.ext-discussiontools-init-lede-button.oo-ui-buttonElement { |
| 888 |
> .oo-ui-buttonElement-button { |
| 889 |
font-weight: normal; |
| 890 |
|
| 891 |
> .oo-ui-labelElement-label { |
| 892 |
color: @color-subtle; |
| 893 |
} |
| 894 |
|
| 895 |
// Boost specificity |
| 896 |
> .oo-ui-iconElement-icon.oo-ui-iconElement-icon.oo-ui-iconElement-icon { |
| 897 |
// When this opacity is applied to black color, we end up with exactly @color-subtle (`#54595d`) |
| 898 |
opacity: @opacity-icon-subtle; |
| 899 |
} |
| 900 |
} |
| 901 |
} |
| 902 |
|
| 903 |
// Avoid double margin/padding caused by combining .oo-ui-panelLayout-padded and .content |
| 904 |
// stylelint-disable-next-line selector-class-pattern |
| 905 |
.ext-discussiontools-ui-ledeSectionDialog-content.oo-ui-panelLayout-padded.content { |
| 906 |
margin: 0 auto; |
| 907 |
} |
| 908 |
|
| 909 |
// HACK: Fake disabled styles for the .mw-ui-button in Vector sticky header (T307726) |
| 910 |
.ext-discussiontools-fake-disabled { |
| 911 |
filter: saturate( 0 ); |
| 912 |
opacity: 0.8; |
| 913 |
pointer-events: none; |
| 914 |
} |