build: Enable no-duplicate-selectors stylelint rule
authorVolker E <volker.e@wikimedia.org>
Tue, 21 Feb 2017 06:42:38 +0000 (22:42 -0800)
committerVolker E <volker.e@wikimedia.org>
Tue, 21 Feb 2017 06:42:38 +0000 (22:42 -0800)
Enabling no-duplicate-selectors stylelint rule and
making it pass.

Change-Id: Ib62b463898098eea1301f0ddfcd4837498272dd4

.stylelintrc
resources/src/mediawiki.action/mediawiki.action.view.filepage.css
resources/src/mediawiki.legacy/commonPrint.css
resources/src/mediawiki.legacy/oldshared.css
resources/src/mediawiki.legacy/shared.css
resources/src/mediawiki.widgets.datetime/CalendarWidget.less
resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.less
resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.less

index 5c01b67..41702aa 100644 (file)
@@ -6,7 +6,6 @@
                "indentation": null,
 
                "no-descending-specificity": null,
-               "no-duplicate-selectors": null,
 
                "selector-list-comma-newline-after": null,
                "selector-no-id": null,
index 185523a..d466216 100644 (file)
@@ -76,6 +76,8 @@
        font-size: 0.8em;
        margin-left: 0.5em;
        margin-bottom: 0.5em;
+       border: 0;
+       border-collapse: collapse;
        width: 400px;
 }
 
        font-weight: bold;
 }
 
-.mw_metadata th {
-       font-weight: normal;
-       text-align: center;
-}
-
-.mw_metadata td {
-       padding: 0.1em;
-}
-
-.mw_metadata {
-       border: 0;
-       border-collapse: collapse;
-}
-
 .mw_metadata td,
 .mw_metadata th {
        border: 1px solid #a2a9b1;
 
 .mw_metadata th {
        background-color: #f8f9fa;
+       font-weight: normal;
+       text-align: center;
 }
 
 .mw_metadata td {
        background-color: #fcfcfc;
+       padding-top: 0.1em;
+       padding-bottom: 0.1em;
 }
 
 .mw_metadata ul.metadata-langlist {
index ed21303..7c2f92b 100644 (file)
@@ -182,22 +182,16 @@ a {
        content: " (https:" attr( href ) ")";
 }
 
-/* MSIE/Win doesn't understand 'inherit' */
 a,
 a.external,
 a.new,
 a.stub {
+       /* IE 6 & 7 don't understand `inherit` */
        color: #000 !important;
        text-decoration: none !important;
-}
-
-/* Continue ... */
-a,
-a.external,
-a.new,
-a.stub {
-       color: inherit !important;
-       text-decoration: inherit !important;
+       /* Modern browser will apply this, IE 6 & 7 ignore the unknown */
+       color: inherit !important; /* stylelint-disable-line declaration-block-no-duplicate-properties */
+       text-decoration: inherit !important; /* stylelint-disable-line declaration-block-no-duplicate-properties */
 }
 
 /**
index e4e3977..d1f58c2 100644 (file)
@@ -329,25 +329,14 @@ li span.deleted {
 /* Classes for Exif data display */
 table.mw_metadata {
        margin-left: 0.5em;
+       border: 0;
+       border-collapse: collapse;
 }
 
 table.mw_metadata caption {
        font-weight: bold;
 }
 
-table.mw_metadata th {
-       font-weight: normal;
-}
-
-table.mw_metadata td {
-       padding: 0.1em;
-}
-
-table.mw_metadata {
-       border: 0;
-       border-collapse: collapse;
-}
-
 table.mw_metadata td,
 table.mw_metadata th {
        border: 1px solid #aaa;
@@ -357,10 +346,13 @@ table.mw_metadata th {
 
 table.mw_metadata th {
        background-color: #f9f9f9;
+       font-weight: normal;
 }
 
 table.mw_metadata td {
        background-color: #fcfcfc;
+       padding-top: 0.1em;
+       padding-bottom: 0.1em;
 }
 
 table.mw_metadata td.spacer {
index 80bdf1a..1a7070e 100644 (file)
@@ -166,6 +166,7 @@ div.patrollink {
  */
 td.mw-label {
        text-align: right;
+       vertical-align: middle;
 }
 
 td.mw-input {
@@ -174,13 +175,6 @@ td.mw-input {
 
 td.mw-submit {
        text-align: left;
-}
-
-td.mw-label {
-       vertical-align: middle;
-}
-
-td.mw-submit {
        white-space: nowrap;
 }
 
index 413efd4..b5b9cbe 100644 (file)
@@ -1,3 +1,4 @@
+/* stylelint-disable no-duplicate-selectors */
 @import "mediawiki.widgets.datetime.definitions";
 
 .mw-widgets-datetime-calendarWidget {
index 6317e9e..1c6c490 100644 (file)
@@ -1,3 +1,4 @@
+/* stylelint-disable no-duplicate-selectors */
 @import "mediawiki.widgets.datetime.definitions";
 
 .mw-widgets-datetime-dateTimeInputWidget {
index aa5c60a..b929a5a 100644 (file)
@@ -5,6 +5,7 @@
  * @license The MIT License (MIT); see LICENSE.txt
  */
 
+/* stylelint-disable no-duplicate-selectors */
 @import 'mediawiki.mixins';
 
 @calendarWidth: 21em;