| 1 |
@import 'mediawiki.skin.variables.less'; |
| 2 |
|
| 3 |
.ext-discussiontools-ui-replyWidget { |
| 4 |
margin-bottom: 1em; |
| 5 |
position: relative; |
| 6 |
clear: both; |
| 7 |
// This is in user language, do not inherit text-align from the content (T306137). |
| 8 |
// We can't set 'text-align: left' (and rely on flipping), because |
| 9 |
// that would affect the input field, which is in content language. |
| 10 |
text-align: initial; |
| 11 |
|
| 12 |
.skin-monobook & { |
| 13 |
font-size: ( 12.8em / 12.7 ); |
| 14 |
} |
| 15 |
} |
| 16 |
|
| 17 |
.skin-vector-2022 { |
| 18 |
.ext-discussiontools-ui-newTopic, |
| 19 |
.ext-discussiontools-ui-replyWidget { |
| 20 |
font-size: 0.875rem; |
| 21 |
line-height: 1.5714285; |
| 22 |
} |
| 23 |
|
| 24 |
.ext-discussiontools-ui-replyWidget-bodyWrapper, |
| 25 |
.ext-discussiontools-ui-newTopic-sectionTitle-field > .oo-ui-fieldLayout-body { |
| 26 |
font-size: var( --font-size-medium ); |
| 27 |
line-height: var( --line-height-medium ); |
| 28 |
} |
| 29 |
} |
| 30 |
|
| 31 |
// @supports does not work when nested |
| 32 |
@supports ( display: flow-root ) { |
| 33 |
.ext-discussiontools-ui-replyWidget { |
| 34 |
// Allow the widget to be squished next to floating elements (T278476). |
| 35 |
// |
| 36 |
// To ensure that everything is squished to the same width, introduce a block formatting context |
| 37 |
// (otherwise the preview or textarea could be wider than the container and mess up the layout). |
| 38 |
// https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context |
| 39 |
// |
| 40 |
// All of the usual ways to do this (listed on that page) have unwanted side-effects |
| 41 |
// (in particular, `overflow: hidden` cuts off VE inspectors), so we must use this relatively |
| 42 |
// recent property, and only apply this fix on supporting browsers, notably excluding Safari <13 |
| 43 |
// (https://caniuse.com/?search=flow-root) |
| 44 |
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */ |
| 45 |
display: flow-root; |
| 46 |
min-width: 20em; |
| 47 |
clear: none; |
| 48 |
} |
| 49 |
} |
| 50 |
|
| 51 |
.ext-discussiontools-ui-replyWidget { /* stylelint-disable-line no-descending-specificity */ |
| 52 |
&-bodyWrapper > .oo-ui-textInputWidget { |
| 53 |
max-width: none; |
| 54 |
|
| 55 |
.oo-ui-inputWidget-input { |
| 56 |
line-height: 1.5em; |
| 57 |
overflow-y: hidden; |
| 58 |
// Leave space for newComments button |
| 59 |
padding-bottom: 22px; |
| 60 |
} |
| 61 |
} |
| 62 |
|
| 63 |
&-scrollback-top { |
| 64 |
transform: translate( -50%, -150% ); |
| 65 |
top: 0; |
| 66 |
left: 50%; |
| 67 |
// .mw-sticky-header-element is also added to move the element down |
| 68 |
// in skins that implement a sticky header |
| 69 |
} |
| 70 |
|
| 71 |
&-scrollback-bottom { |
| 72 |
transform: translate( -50%, 150% ); |
| 73 |
bottom: 0; |
| 74 |
left: 50%; |
| 75 |
} |
| 76 |
|
| 77 |
&-scrollback-top, |
| 78 |
&-scrollback-bottom { |
| 79 |
position: fixed; |
| 80 |
opacity: 0; |
| 81 |
transition: transform 250ms, opacity 250ms; |
| 82 |
z-index: 1; |
| 83 |
margin: 1em 0; |
| 84 |
box-shadow: 0 2px 2px 0 rgba( 0, 0, 0, 0.25 ); |
| 85 |
|
| 86 |
// OOUI Apex theme |
| 87 |
.skin-monobook & { |
| 88 |
box-shadow: 0 0.2em 1em rgba( 0, 0, 0, 0.3 ); |
| 89 |
} |
| 90 |
|
| 91 |
// Buttons can't be reliably positioned on iOS when the keyboard |
| 92 |
// is visible, so hide them |
| 93 |
.ext-discussiontools-init-virtual-keyboard-open.ext-discussiontools-init-ios & { |
| 94 |
display: none; |
| 95 |
} |
| 96 |
} |
| 97 |
|
| 98 |
/* stylelint-disable no-descending-specificity */ |
| 99 |
&-floating-top &-scrollback-top, |
| 100 |
&-floating-bottom &-scrollback-bottom { |
| 101 |
opacity: 1; |
| 102 |
transform: translate( -50%, 0 ); |
| 103 |
} |
| 104 |
/* stylelint-enable no-descending-specificity */ |
| 105 |
|
| 106 |
.ve-ui-targetToolbar > .oo-ui-toolbar-bar { |
| 107 |
background: none; |
| 108 |
box-shadow: none; |
| 109 |
border: 0; |
| 110 |
// Stretch to all available space |
| 111 |
flex-grow: 1; |
| 112 |
} |
| 113 |
|
| 114 |
.oo-ui-toolbar-position-top .ve-ui-toolbarDialog-position-above { |
| 115 |
border-top: 0; |
| 116 |
|
| 117 |
.oo-ui-window-body { |
| 118 |
padding-left: 0; |
| 119 |
padding-right: 0; |
| 120 |
} |
| 121 |
} |
| 122 |
|
| 123 |
.ve-ui-targetToolbar { |
| 124 |
display: flex; |
| 125 |
// Allow wrapping when the space is very narrow (mode switcher above toolbar) |
| 126 |
flex-wrap: wrap-reverse; |
| 127 |
|
| 128 |
> .oo-ui-windowManager { |
| 129 |
flex-basis: 100%; |
| 130 |
box-shadow: 0 -1px 1px 0 rgba( 0, 0, 0, 0.1 ); |
| 131 |
} |
| 132 |
} |
| 133 |
|
| 134 |
.skin-minerva & .ve-ui-surface-visual .ve-ce-paragraphNode { |
| 135 |
// Reduce paragraph spacing in editor, as replies will actually generate <dd> not <p> |
| 136 |
margin: 0; |
| 137 |
|
| 138 |
&:first-child { |
| 139 |
margin-top: 0.5em; |
| 140 |
} |
| 141 |
} |
| 142 |
|
| 143 |
.skin-monobook & .ve-ui-surface-visual { |
| 144 |
font-size: ( 12.7em / 12.8 ); |
| 145 |
} |
| 146 |
|
| 147 |
&-modeTabs { |
| 148 |
box-shadow: none; |
| 149 |
height: 3em; |
| 150 |
text-align: right; |
| 151 |
// Hide outline that can appear after switching modes via keyboard |
| 152 |
outline: 0; |
| 153 |
|
| 154 |
.oo-ui-tabOptionWidget:last-child { |
| 155 |
margin-right: 2px; |
| 156 |
} |
| 157 |
|
| 158 |
.ext-discussiontools-ui-modeTab { |
| 159 |
// OOUI Apex theme |
| 160 |
.skin-monobook & { |
| 161 |
margin-top: 0; |
| 162 |
} |
| 163 |
} |
| 164 |
|
| 165 |
// When mode tabs are focussed, the only available option uses the same styles as normal focus |
| 166 |
// Hovering also adds this class, but is styled upstream with just an underline. |
| 167 |
.ext-discussiontools-ui-modeTab.oo-ui-optionWidget-highlighted:not( :hover ) { |
| 168 |
color: @color-progressive; |
| 169 |
border-radius: @border-radius-base; |
| 170 |
box-shadow: @box-shadow-inset-medium @box-shadow-color-progressive-selected; |
| 171 |
} |
| 172 |
|
| 173 |
// The unavailable option in mode tabs is disabled, to make it un-interactable, but we want it |
| 174 |
// to look as if it was selected |
| 175 |
.ext-discussiontools-ui-modeTab.oo-ui-widget-disabled { |
| 176 |
color: @color-progressive; |
| 177 |
box-shadow: @box-shadow-inset-medium-vertical @box-shadow-color-progressive-selected; |
| 178 |
} |
| 179 |
} |
| 180 |
|
| 181 |
&-editSwitch { |
| 182 |
text-align: right; |
| 183 |
|
| 184 |
.oo-ui-toolbar-bar { /* stylelint-disable-line no-descending-specificity */ |
| 185 |
border: 0; |
| 186 |
box-shadow: none; |
| 187 |
} |
| 188 |
|
| 189 |
.oo-ui-toolbar-popups { |
| 190 |
text-align: left; |
| 191 |
} |
| 192 |
} |
| 193 |
|
| 194 |
&-actionsWrapper { |
| 195 |
margin-top: 0.5em; |
| 196 |
display: flex; |
| 197 |
// Allow wrapping when the space is very narrow (buttons above the footer text) |
| 198 |
flex-wrap: wrap-reverse; |
| 199 |
// When wrapping, align actions to the right |
| 200 |
justify-content: flex-end; |
| 201 |
} |
| 202 |
|
| 203 |
&-actions { |
| 204 |
// Add spacing before the footer when wrapping |
| 205 |
margin-bottom: 0.5em; |
| 206 |
margin-left: 3em; |
| 207 |
white-space: nowrap; |
| 208 |
|
| 209 |
.skin-minerva & { |
| 210 |
margin-top: -2em; |
| 211 |
} |
| 212 |
} |
| 213 |
|
| 214 |
.skin-minerva &-advanced:not( .oo-ui-element-hidden ) ~ &-actionsWrapper &-actions { |
| 215 |
margin-top: 0; |
| 216 |
} |
| 217 |
|
| 218 |
&-footer { |
| 219 |
// Preferred width; if there isn't enough space, this wraps under the actions |
| 220 |
flex-basis: 20em; |
| 221 |
// Stretch to all available space |
| 222 |
flex-grow: 1; |
| 223 |
font-size: @font-size-x-small; |
| 224 |
color: @color-subtle; |
| 225 |
|
| 226 |
> p { |
| 227 |
margin-bottom: 0.5em; |
| 228 |
} |
| 229 |
|
| 230 |
> * { |
| 231 |
&:first-child { |
| 232 |
margin-top: 0; |
| 233 |
} |
| 234 |
|
| 235 |
&:last-child { |
| 236 |
margin-bottom: 0; |
| 237 |
} |
| 238 |
} |
| 239 |
|
| 240 |
&-links { |
| 241 |
// Extra specificity to override rules from MediaWiki |
| 242 |
&, |
| 243 |
.mw-content-ltr &, |
| 244 |
.mw-content-rtl & { |
| 245 |
margin: 0; |
| 246 |
padding: 0; |
| 247 |
} |
| 248 |
|
| 249 |
li { |
| 250 |
display: inline; |
| 251 |
|
| 252 |
&::after { |
| 253 |
content: ' • '; |
| 254 |
} |
| 255 |
|
| 256 |
&:last-child::after { |
| 257 |
content: ''; |
| 258 |
} |
| 259 |
} |
| 260 |
} |
| 261 |
|
| 262 |
.skin-minerva & > p { |
| 263 |
margin-bottom: 0; |
| 264 |
} |
| 265 |
} |
| 266 |
|
| 267 |
&-preview { |
| 268 |
background: #f6f6f6; |
| 269 |
padding: 0.5em 1em; |
| 270 |
// Establish a block formatting context, so that floated content (e.g. image thumbnails) |
| 271 |
// doesn't leak out and mess up our layout. (Also hides the 'Preview' label when empty.) |
| 272 |
overflow: hidden; |
| 273 |
|
| 274 |
&:empty { |
| 275 |
height: 0; |
| 276 |
padding: 0; |
| 277 |
} |
| 278 |
|
| 279 |
&::before { |
| 280 |
content: attr( data-label ); |
| 281 |
color: #808080; |
| 282 |
} |
| 283 |
|
| 284 |
> .mw-parser-output { |
| 285 |
.skin-monobook & { |
| 286 |
font-size: ( 12.7em / 12.8 ); |
| 287 |
} |
| 288 |
} |
| 289 |
|
| 290 |
.ext-discussiontools-ui-replyWidget:not( .ext-discussiontools-ui-replyWidget-newTopic ) & > .mw-parser-output { |
| 291 |
margin-left: -1.6em; |
| 292 |
|
| 293 |
.skin-minerva & { |
| 294 |
margin-left: -1em; |
| 295 |
} |
| 296 |
} |
| 297 |
|
| 298 |
> .mw-parser-output > h2:first-child { |
| 299 |
// Remove excess spacing above section title for preview |
| 300 |
padding-top: 0; |
| 301 |
margin-top: 0.25em; |
| 302 |
} |
| 303 |
|
| 304 |
.ext-discussiontools-init-section-bar { |
| 305 |
// Looks just a little weird to display this in preview of your own new topic (T309423) |
| 306 |
display: none; |
| 307 |
} |
| 308 |
|
| 309 |
// Hide collapse icons on mobile |
| 310 |
.section-heading .indicator { /* stylelint-disable-line selector-class-pattern */ |
| 311 |
display: none; |
| 312 |
} |
| 313 |
|
| 314 |
// ... and expand sections |
| 315 |
.collapsible-block[ hidden ] { /* stylelint-disable-line selector-class-pattern */ |
| 316 |
// If hidden=until-found is supported, this will set content-visibility: hidden; |
| 317 |
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */ |
| 318 |
content-visibility: visible; |
| 319 |
// otherwise it will set display: none; |
| 320 |
display: block; |
| 321 |
} |
| 322 |
// TODO: Consider doing this via's Toggler.js's APIs, rather than CSS overrides. |
| 323 |
|
| 324 |
@media screen { |
| 325 |
html.skin-theme-clientpref-night & { |
| 326 |
background: @background-color-interactive-subtle; |
| 327 |
} |
| 328 |
} |
| 329 |
|
| 330 |
@media screen and ( prefers-color-scheme: dark ) { |
| 331 |
html.skin-theme-clientpref-os & { |
| 332 |
background: @background-color-interactive-subtle; |
| 333 |
} |
| 334 |
} |
| 335 |
} |
| 336 |
|
| 337 |
&-bodyWrapper { |
| 338 |
position: relative; |
| 339 |
} |
| 340 |
|
| 341 |
&-newComments { |
| 342 |
position: absolute; |
| 343 |
bottom: -1em; |
| 344 |
left: 50%; |
| 345 |
transition: transform 250ms ease-in, opacity 250ms ease-in; |
| 346 |
transform: translate( -50%, 30px ); |
| 347 |
opacity: 0; |
| 348 |
white-space: nowrap; |
| 349 |
|
| 350 |
.skin-minerva & { |
| 351 |
// stylelint-disable-next-line declaration-property-unit-disallowed-list |
| 352 |
font-size: 14px; |
| 353 |
} |
| 354 |
|
| 355 |
&-open { |
| 356 |
transform: translate( -50%, 0 ); |
| 357 |
opacity: 1; |
| 358 |
} |
| 359 |
|
| 360 |
// Same border-radius is applied to all these elements to ensure that the trimmed-off corner |
| 361 |
// areas don't capture clicks |
| 362 |
&, |
| 363 |
.oo-ui-buttonElement-framed:first-child, |
| 364 |
.oo-ui-buttonElement-framed:first-child .oo-ui-buttonElement-button { |
| 365 |
border-bottom-left-radius: 1.1em; |
| 366 |
border-top-left-radius: 1.1em; |
| 367 |
} |
| 368 |
|
| 369 |
// Same border-radius is applied to all these elements to ensure that the trimmed-off corner |
| 370 |
// areas don't capture clicks |
| 371 |
&, |
| 372 |
.oo-ui-buttonElement-framed:last-child, |
| 373 |
.oo-ui-buttonElement-framed:last-child .oo-ui-buttonElement-button { |
| 374 |
border-bottom-right-radius: 1.1em; |
| 375 |
border-top-right-radius: 1.1em; |
| 376 |
} |
| 377 |
} |
| 378 |
|
| 379 |
&-anonWarning, |
| 380 |
&-advanced { |
| 381 |
&.oo-ui-messageWidget-block { |
| 382 |
padding: 8px 12px; |
| 383 |
} |
| 384 |
} |
| 385 |
|
| 386 |
&-captcha { |
| 387 |
margin-top: 0.5em; |
| 388 |
} |
| 389 |
|
| 390 |
&-error { |
| 391 |
margin-bottom: 0.5em; |
| 392 |
} |
| 393 |
|
| 394 |
&-anonWarning { |
| 395 |
margin-bottom: 0.5em; |
| 396 |
display: flex; |
| 397 |
align-items: center; |
| 398 |
// Allow wrapping when the space is very narrow (buttons below the warning text) |
| 399 |
flex-wrap: wrap; |
| 400 |
// When wrapping, align actions to the right |
| 401 |
justify-content: flex-end; |
| 402 |
|
| 403 |
&.oo-ui-messageWidget-block { |
| 404 |
> .oo-ui-iconElement-icon { |
| 405 |
background-position: center center; |
| 406 |
transform: scale( 1.5 ); |
| 407 |
transform-origin: 0 center; |
| 408 |
left: 1em; |
| 409 |
|
| 410 |
// Hide warning icon below tablet width |
| 411 |
@media all and ( max-width: @max-width-breakpoint-mobile ) { |
| 412 |
& { |
| 413 |
display: none; |
| 414 |
} |
| 415 |
} |
| 416 |
} |
| 417 |
} |
| 418 |
|
| 419 |
> .oo-ui-labelElement-label { |
| 420 |
flex-grow: 1; |
| 421 |
flex-basis: 20em; |
| 422 |
margin-left: 3em; |
| 423 |
|
| 424 |
// Hide warning icon below tablet width |
| 425 |
@media all and ( max-width: @max-width-breakpoint-mobile ) { |
| 426 |
& { |
| 427 |
margin-left: 0; |
| 428 |
} |
| 429 |
} |
| 430 |
} |
| 431 |
|
| 432 |
.ext-discussiontools-ui-replyWidget-actions { |
| 433 |
// Fix alignment within message widget |
| 434 |
margin-top: 0.5em; |
| 435 |
} |
| 436 |
} |
| 437 |
|
| 438 |
&-editSummaryField { |
| 439 |
// We want to display the "Summary" label and the checkboxes on the same line (above the summary |
| 440 |
// field), but prevent them from overlapping if there's not enough space. The checkboxes are |
| 441 |
// after the summary field in the DOM for accessibility reasons, but we want to display them |
| 442 |
// above it, and we can't achieve this with floats. |
| 443 |
.oo-ui-fieldLayout-body { |
| 444 |
display: flex; |
| 445 |
flex-flow: row-reverse wrap; |
| 446 |
justify-content: space-between; |
| 447 |
} |
| 448 |
|
| 449 |
.ext-discussiontools-ui-replyWidget-checkboxes { |
| 450 |
order: 1; |
| 451 |
} |
| 452 |
|
| 453 |
.oo-ui-fieldLayout-header { |
| 454 |
order: 2; |
| 455 |
// Stretch to all available space on the line |
| 456 |
flex-grow: 1; |
| 457 |
} |
| 458 |
|
| 459 |
.oo-ui-fieldLayout-field { |
| 460 |
order: 3; |
| 461 |
// Force to a separate line |
| 462 |
width: 100%; |
| 463 |
} |
| 464 |
|
| 465 |
// Change field layout and order on mobile |
| 466 |
@media all and ( max-width: @max-width-breakpoint-mobile ) { |
| 467 |
.oo-ui-fieldLayout-header { |
| 468 |
order: 1; |
| 469 |
} |
| 470 |
|
| 471 |
.oo-ui-fieldLayout-field { |
| 472 |
order: 2; |
| 473 |
} |
| 474 |
|
| 475 |
.ext-discussiontools-ui-replyWidget-checkboxes { |
| 476 |
order: 3; |
| 477 |
flex-grow: 1; |
| 478 |
margin-top: 1em; |
| 479 |
} |
| 480 |
} |
| 481 |
} |
| 482 |
|
| 483 |
&-editSummary { |
| 484 |
max-width: none; |
| 485 |
} |
| 486 |
|
| 487 |
&-advanced.oo-ui-element-hidden + &-anonWarning { |
| 488 |
// Removing spacing between message widgets when the first is hidden |
| 489 |
margin-top: 0; |
| 490 |
} |
| 491 |
|
| 492 |
&-advancedToggle { |
| 493 |
font-size: @font-size-x-small; |
| 494 |
|
| 495 |
.oo-ui-indicatorElement-indicator { |
| 496 |
min-width: auto; |
| 497 |
} |
| 498 |
|
| 499 |
.oo-ui-buttonElement-button { |
| 500 |
min-height: auto; |
| 501 |
} |
| 502 |
} |
| 503 |
} |