@import 'mediawiki.skin.variables.less'; @import 'mediawiki.mixins.less'; /* stylelint-disable no-descending-specificity */ span[ data-mw-comment-start ] { // Give comment anchors a negative offset so we don't position // them right at the edge of the page when jumping to them. // Use margin rather than position to avoid Chrome bug (T317135). position: absolute; margin-top: -1em; } // stylelint-disable-next-line @stylistic/selector-list-comma-newline-after h1, h2, h3, h4, h5, h6 { span[ data-mw-comment-end ] { // Support: Safari // Markers at the end of a line and before an inline-block (e.g. edit icon) // can cause text to stop wrapping properly. (T298371) display: inline-block; } } .ext-discussiontools-init-replylink-buttons { user-select: none; display: none; // If a site has text-indent set on content, it would be inherited here and cause excessive padding text-indent: 0; // Keep all buttons on one line white-space: nowrap; // Add space before the buttons using actual spaces rather than margin, so that they may collapse // when the buttons wrap to a new line (T325416). &::before { // Must use character escapes to avoid CSS minifier messing up the spaces content: '\20\20'; white-space: pre-wrap; } .ext-discussiontools-replytool-enabled & { display: inline; .client-nojs & { display: none; } } // Archived talk section (T295553) .ext-discussiontools-replytool-enabled .mw-archivedtalk & { // stylelint-disable-next-line declaration-no-important display: none !important; } .ext-discussiontools-init-replylink { &-reply { cursor: pointer; } // Similar to mw-editsection-bracket &-bracket { color: @color-subtle; &:not( :last-child ) { .margin-inline( 0, 0.25em ); } &:last-child { .margin-inline( 0.25em, 0 ); } } } .ext-discussiontools-init-replylink-open & > .ext-discussiontools-init-replylink-reply { color: #72777d; pointer-events: none; } &.ext-discussiontools-init-replylink-active > .ext-discussiontools-init-replylink-reply { color: @color-base; text-decoration: none; } .ext-discussiontools-init-section-overflowMenuButton.oo-ui-widget-enabled > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon:not( .oo-ui-image-invert ) { opacity: 0.5; } // Flip the icon in LTR interface languages. Un-flip it in RTL. // TODO This should use a different icon, with the image itself flipped (T325664). // stylelint-disable-next-line selector-class-pattern body.ltr & .ext-discussiontools-init-replybutton .oo-ui-iconElement-icon.oo-ui-icon-share { transform: scaleX( -1 ); } @media print { // stylelint-disable-next-line declaration-no-important display: none !important; } } // Don't re-color :visited links that act as buttons (T319019) .ext-discussiontools-init-replylink-reply, .ext-discussiontools-init-section-subscribe-link { &:visited { color: @color-link; } } .ext-discussiontools-init-timestamplink { &, &:visited, &:active { color: @color-placeholder; } } .ext-discussiontools-init-noMarker { list-style: none; } .ext-discussiontools-init-highlight { position: absolute; pointer-events: none; opacity: 0; mix-blend-mode: darken; // Support: Safari // Safari doesn't blend this overlay with the text unless GPU rendering is forced. transform: translateZ( 0 ); @media screen { html.skin-theme-clientpref-night & { mix-blend-mode: lighten; } } @media screen and ( prefers-color-scheme: dark ) { html.skin-theme-clientpref-os & { mix-blend-mode: lighten; } } } .ext-discussiontools-init-highlight-fadein { opacity: 1; } .ext-discussiontools-init-highlight-fadeout { opacity: 0; transition: opacity 250ms ease-out; } .ext-discussiontools-init-publishedcomment { // T368086 background-color: @background-color-success-subtle; } .ext-discussiontools-init-targetcomment { // T368086 background-color: @background-color-progressive-subtle; } // Topic subscriptions (both kinds) /* stylelint-disable selector-max-id, selector-class-pattern */ #ca-dt-page-subscribe, .menu__item--page-actions-overflow-t-page-subscribe, .ext-discussiontools-init-section-subscribe, .ext-discussiontools-init-section-subscribeButton { // If JS is enabled, disable the buttons until it's loaded, so that users don't accidentally // navigate to the no-JS interface. // TODO: These clicks will be ignored, but ideally we would process them once ready (T183720). .client-js:not( .ext-discussiontools-init-ready ) & { pointer-events: none; } } /* stylelint-enable selector-max-id, selector-class-pattern */ .ext-discussiontools-visualenhancements-enabled .ext-discussiontools-init-section { // Introduce a block formatting context so that floated "subscribe" links/buttons // aren't affected by other floats (T327469). Most skins already include this rule // for headings, but we add the floating stuff outside of headings (since T314714). // https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context overflow: hidden; // Prevent squishing too much (T335823) min-width: 20em; .mw-mf& { // Prevent the overflow menu's focus ring from being clipped. // We have no floated links/buttons on mobile, so this is okay. overflow: visible; } } // Topic subscriptions (link) .ext-discussiontools-init-section-subscribe { display: none; .ext-discussiontools-topicsubscription-enabled & { display: block; } // Directional properties must be based on content direction. .mw-content-ltr &, .mw-content-rtl .mw-content-ltr & { /* @noflip */ float: right; } .mw-content-rtl &, .mw-content-ltr .mw-content-rtl & { /* @noflip */ float: left; } &.mw-editsection-like { -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; margin-top: 0.6em; // Restore line height after Ie2ef68f3d0d line-height: inherit; } .mw-mf & { // Subscribe button is used instead on mobile display: none; } // Similar to mw-editsection-bracket &-bracket { color: @color-subtle; &:first-child { .margin-inline( 0, 0.25em ); } &:last-child { .margin-inline( 0.25em, 0 ); } } &-link&-link-pending { color: #72777d; pointer-events: none; } @media print { // stylelint-disable-next-line declaration-no-important display: none !important; } } // Topic subscriptions (button) // Boost specificity by adding .oo-ui-buttonElement .ext-discussiontools-init-section-subscribeButton.oo-ui-buttonElement { display: none; > .oo-ui-buttonElement-button { font-weight: normal; } .ext-discussiontools-topicsubscription-enabled.ext-discussiontools-visualenhancements-enabled & { display: inline-block; } // Directional properties must be based on content direction. body:not( .mw-mf ) .mw-content-ltr &, body:not( .mw-mf ) .mw-content-rtl .mw-content-ltr & { /* @noflip */ float: right; /* @noflip */ // stylelint-disable-next-line declaration-no-important margin: -2px 0 0 1em !important; } body:not( .mw-mf ) .mw-content-rtl &, body:not( .mw-mf ) .mw-content-ltr .mw-content-rtl & { /* @noflip */ float: left; /* @noflip */ // stylelint-disable-next-line declaration-no-important margin: -2px 1em 0 0 !important; } @media print { // stylelint-disable-next-line declaration-no-important display: none !important; } } // Visual enhancements disabled .ext-discussiontools-init-section-bar, .ext-discussiontools-init-replybutton.oo-ui-buttonElement, .ext-discussiontools-init-pageframe-latestcomment, .ext-discussiontools-init-sidebar-meta { display: none; } .skin-vector-2022 { .ext-discussiontools-init-section-bar, .ext-discussiontools-init-replybutton.oo-ui-buttonElement, .ext-discussiontools-init-section-subscribe, .ext-discussiontools-init-section-subscribeButton { font-size: 0.875rem; } } .ext-discussiontools-init-pageframe-latestcomment { color: @color-subtle; } // Visual enhancements enabled // Reply sub-feature .ext-discussiontools-visualenhancements_reply-enabled { .ext-discussiontools-init-replylink-bracket, .ext-discussiontools-init-replylink-reply { display: none; } .ext-discussiontools-init-replybutton { display: inline-block; margin-right: 0; } &:not( .mw-mf ) .ext-discussiontools-init-replylink-buttons .oo-ui-buttonElement { // Slim height for inline placement. Minerva uses block placement. margin-top: -8px; margin-bottom: -8px; &:not( .oo-ui-iconElement ) > .oo-ui-buttonElement-button { padding: 4px 6px; } &.oo-ui-iconElement > .oo-ui-buttonElement-button { padding-top: 4px; padding-bottom: 4px; } &.oo-ui-buttonElement-frameless.oo-ui-labelElement:first-child { // Cancel out 6px padding (set above) and 1px border (set in OOUI) // to align the button text with surrounding text margin-left: -7px; } } // Use block placement for the reply buttons on mobile, to make them easier to tap. &.mw-mf .ext-discussiontools-init-replylink-buttons { display: block; &::before { // Remove the spaces that are used for inline placement (T325416), added at the top of this file. content: ''; } } } // Page frame sub-feature .ext-discussiontools-visualenhancements_pageframe-enabled { .mw-page-title-separator::after { content: ' '; } .ext-discussiontools-init-pageframe-latestcomment { display: block; word-wrap: break-word; } .ext-discussiontools-init-sidebar-meta { display: block; padding-bottom: 6px; color: @color-subtle; white-space: nowrap; } } // Main feature (topic containers) .mw-mf .ext-discussiontools-init-section { // Need to fix some styles on mobile even when the feature is not enabled display: flex; align-items: center; > h2 { flex-grow: 1; } } .ext-discussiontools-visualenhancements-enabled { h2.ext-discussiontools-ui-newTopic-sectionTitle { font-size: 1.5em; } // Boost specificity .ext-discussiontools-init-section.mw-heading2, .ext-discussiontools-init-section { margin: 36px 0 12px 0; padding: 10px 0 0 0; font-weight: bold; // stylelint-disable-next-line declaration-no-important font-family: sans-serif !important; // stylelint-disable-next-line declaration-no-important font-size: inherit !important; border: 0; border-top: @border-width-base @border-style-base @border-color-base; h2 { margin: 0; padding: 0; font-weight: bold; // stylelint-disable-next-line declaration-no-important font-family: sans-serif !important; font-size: 1.5em; border: 0; } // Hide old subscribe link &-subscribe { display: none; } &-bar { display: flex; // Use interface language direction (auto-flipped for RTL) direction: ltr; } &-metadata { display: flex; flex-wrap: wrap; } &-metaitem { font-weight: normal; color: @color-subtle; // Make same height as "unsubscribe" button margin: 7px 0; & + .ext-discussiontools-init-section-metaitem { margin-left: 12px; padding-left: 12px; border-left: @border-width-base @border-style-base @border-color-base; } } } // [Old Parser HTML] Hide the border-top (section divider) if: /* Our section heading is the first element on the page */ .mw-parser-output > .ext-discussiontools-init-section:first-child, /* Our section heading is the first element on the page, except for invisible TOC placeholder */ .mw-parser-output > meta:first-child + .ext-discussiontools-init-section, /* Our section heading directly follows a