Don't apply styling for Special:Contributions on other pages
authorBartosz Dziewoński <matma.rex@gmail.com>
Wed, 16 Oct 2019 20:26:37 +0000 (22:26 +0200)
committerJforrester <jforrester@wikimedia.org>
Wed, 16 Oct 2019 21:35:17 +0000 (21:35 +0000)
This file is part of a large ResourceLoader module that is loaded on
many special pages.

The change here uses the same approach as other files in this
directory, e.g. block.less.

Bug: T235137
Change-Id: I23c552944c6e7e31a4107f7974bb1e5867627283
(cherry picked from commit ffaae18c76f5b6674f8aa565ee9e7579f9aac3e1)

resources/src/mediawiki.special/contributions.less

index cc0e538..7554db2 100644 (file)
 @ooui-spacing-medium: 12 / @ooui-font-size-browser / @ooui-font-size-base; // Equals `0.8571429em`≈`12px`.
 @ooui-spacing-large: 16 / @ooui-font-size-browser / @ooui-font-size-base; // Equals `1.1428571em`≈`16px`.
 
-.oo-ui-fieldsetLayout-group {
-       max-width: 50em;
+.mw-special-Contributions {
+       .oo-ui-fieldsetLayout-group {
+               max-width: 50em;
 
-       .oo-ui-panelLayout-padded.oo-ui-panelLayout-framed {
-               margin: 0;
-               border: 0;
-               padding: 0;
-       }
+               .oo-ui-panelLayout-padded.oo-ui-panelLayout-framed {
+                       margin: 0;
+                       border: 0;
+                       padding: 0;
+               }
 
-       // Hide extra `legend`s when grouping form in sections.
-       .oo-ui-fieldsetLayout.oo-ui-labelElement > .oo-ui-fieldsetLayout-header {
-               display: none;
+               // Hide extra `legend`s when grouping form in sections.
+               .oo-ui-fieldsetLayout.oo-ui-labelElement > .oo-ui-fieldsetLayout-header {
+                       display: none;
+               }
        }
-}
 
-.mw-autocomplete-user.oo-ui-fieldLayout {
-       margin-top: @ooui-spacing-small;
-}
+       .mw-autocomplete-user.oo-ui-fieldLayout {
+               margin-top: @ooui-spacing-small;
+       }
 
-// Higher specificity needed to override OOUIHTMLForm styles.
-.mw-htmlform-field-HTMLMultiSelectField.mw-htmlform-flatlist.oo-ui-fieldLayout {
-       margin-top: @ooui-spacing-small;
-}
+       // Higher specificity needed to override OOUIHTMLForm styles.
+       .mw-htmlform-field-HTMLMultiSelectField.mw-htmlform-flatlist.oo-ui-fieldLayout {
+               margin-top: @ooui-spacing-small;
+       }
 
-.mw-htmlform-field-HTMLTagFilter ~ .mw-htmlform-field-HTMLCheckField.oo-ui-fieldLayout {
-       display: inline-block;
-       padding-right: @ooui-spacing-large;
-}
+       .mw-htmlform-field-HTMLTagFilter ~ .mw-htmlform-field-HTMLCheckField.oo-ui-fieldLayout {
+               display: inline-block;
+               padding-right: @ooui-spacing-large;
+       }
 
-// Clearfix for floated `.mw-htmlform-field-HTMLDateTimeField` below.
-#mw-htmlform-contribs-date:after {
-       content: '';
-       clear: both;
-       display: block;
-}
+       // Clearfix for floated `.mw-htmlform-field-HTMLDateTimeField` below.
+       #mw-htmlform-contribs-date:after {
+               content: '';
+               clear: both;
+               display: block;
+       }
 
-.mw-htmlform-field-HTMLDateTimeField {
-       margin-right: @ooui-spacing-large;
-       margin-bottom: @ooui-spacing-small;
+       .mw-htmlform-field-HTMLDateTimeField {
+               margin-right: @ooui-spacing-large;
+               margin-bottom: @ooui-spacing-small;
+       }
 
-       .oo-ui-fieldLayout.oo-ui-labelElement&:first-child {
+       .oo-ui-fieldLayout.oo-ui-labelElement.mw-htmlform-field-HTMLDateTimeField:first-child {
                margin-top: @ooui-spacing-medium;
        }
-}
 
-@media all and ( min-width: @width-breakpoint-tablet ) {
-       .mw-htmlform-field-HTMLDateTimeField {
-               float: left;
-               // Same `width` as DateInputWidget.
-               width: 21em;
+       @media all and ( min-width: @width-breakpoint-tablet ) {
+               .mw-htmlform-field-HTMLDateTimeField {
+                       float: left;
+                       // Same `width` as DateInputWidget.
+                       width: 21em;
+               }
        }
 }