mediawiki.special.changeslist is a skinStyle module
authorjdlrobson <jdlrobson@gmail.com>
Tue, 26 Mar 2019 18:51:39 +0000 (11:51 -0700)
committerjdlrobson <jdlrobson@gmail.com>
Tue, 26 Mar 2019 21:49:53 +0000 (14:49 -0700)
Allow skins full control over styling changelists
Several styles relating to unicode-bidi and client-js are
made mandatory.

The mw-changeslist-legend rules I will review separately with
Volker to determine whether they should be mandatory too, once
I'm more informed about how Minerva might use them.

Change-Id: I92c5fdc33b50771bd45e4945185c27395c608eb4

resources/Resources.php
resources/src/mediawiki.special.changeslist.less [deleted file]
resources/src/mediawiki.special.changeslist/changeslist.less [new file with mode: 0644]
resources/src/mediawiki.special.changeslist/default.less [new file with mode: 0644]

index b2d0ad2..cb32340 100644 (file)
@@ -2147,7 +2147,10 @@ return [
        ],
        'mediawiki.special.changeslist' => [
                'styles' => [
-                       'resources/src/mediawiki.special.changeslist.less',
+                       'resources/src/mediawiki.special.changeslist/changeslist.less'
+               ],
+               'skinStyles' => [
+                       'default' => 'resources/src/mediawiki.special.changeslist/default.less',
                ],
                'targets' => [ 'desktop', 'mobile' ],
        ],
diff --git a/resources/src/mediawiki.special.changeslist.less b/resources/src/mediawiki.special.changeslist.less
deleted file mode 100644 (file)
index c78354b..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Styling for Special:Watchlist and Special:RecentChanges
- */
-
-.client-js .mw-input-hidden {
-       display: none;
-}
-
-/* Make sure namespace label is aligned correctly on mobile when checkboxes are displayed */
-.mw-label.mw-namespace-label {
-       vertical-align: top;
-}
-
-.mw-changeslist-line-watched .mw-title {
-       font-weight: bold;
-}
-
-/*
- * Titles, including username links, and also tag names
- * are prone to getting jumbled up
- * with other titles, usernames, etc. in mixed RTL-LTR environment.
- */
-.mw-changeslist .mw-tag-marker,
-.mw-changeslist .mw-title {
-       unicode-bidi: embed;
-}
-
-/* Colored watchlist and recent changes numbers */
-.mw-plusminus-pos {
-       color: #006400; /* dark green */
-}
-
-.mw-plusminus-neg {
-       color: #8b0000; /* dark red */
-}
-
-.mw-plusminus-null {
-       color: #a2a9b1; /* gray */
-}
-
-/*
- * Bidi-isolate these numbers.
- * See https://phabricator.wikimedia.org/T93484
- */
-.mw-plusminus-pos,
-.mw-plusminus-neg,
-.mw-plusminus-null {
-       unicode-bidi: -moz-isolate;
-       unicode-bidi: isolate;
-}
-
-/* Prevent FOUC if legend is initially collapsed */
-.mw-changeslist-legend.mw-collapsed .mw-collapsible-content {
-       display: none;
-}
-
-.mw-changeslist-legend.mw-collapsed {
-       margin-bottom: 0;
-}
-
-/* Prevent pushing down the content if legend is collapsed */
-.mw-changeslist-legend.mw-collapsed ~ ul:first-of-type > li:first-child,
-.mw-changeslist-legend.mw-collapsed + h4 + div > table.mw-changeslist-line:first-child {
-       clear: right;
-}
-
-/* Hide RCFilters highlight containers if RCFilters is not enabled.
-   This is overridden in mw.ui.rcfilters.ChangesListWrapperWidget.less if RCFilters is enabled. */
-.mw-rcfilters-ui-highlights {
-       display: none;
-}
diff --git a/resources/src/mediawiki.special.changeslist/changeslist.less b/resources/src/mediawiki.special.changeslist/changeslist.less
new file mode 100644 (file)
index 0000000..f24d1f2
--- /dev/null
@@ -0,0 +1,24 @@
+.client-js .mw-input-hidden {
+       display: none;
+}
+
+/*
+ * Titles, including username links, and also tag names
+ * are prone to getting jumbled up
+ * with other titles, usernames, etc. in mixed RTL-LTR environment.
+ */
+.mw-changeslist .mw-tag-marker,
+.mw-changeslist .mw-title {
+       unicode-bidi: embed;
+}
+
+/*
+ * Bidi-isolate these numbers.
+ * See https://phabricator.wikimedia.org/T93484
+ */
+.mw-plusminus-pos,
+.mw-plusminus-neg,
+.mw-plusminus-null {
+       unicode-bidi: -moz-isolate;
+       unicode-bidi: isolate;
+}
diff --git a/resources/src/mediawiki.special.changeslist/default.less b/resources/src/mediawiki.special.changeslist/default.less
new file mode 100644 (file)
index 0000000..203beee
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Styling for Special:Watchlist and Special:RecentChanges
+ */
+
+/* Make sure namespace label is aligned correctly on mobile when checkboxes are displayed */
+.mw-label.mw-namespace-label {
+       vertical-align: top;
+}
+
+.mw-changeslist-line-watched .mw-title {
+       font-weight: bold;
+}
+
+/* Colored watchlist and recent changes numbers */
+.mw-plusminus-pos {
+       color: #006400; /* dark green */
+}
+
+.mw-plusminus-neg {
+       color: #8b0000; /* dark red */
+}
+
+.mw-plusminus-null {
+       color: #a2a9b1; /* gray */
+}
+
+/* Prevent FOUC if legend is initially collapsed */
+.mw-changeslist-legend.mw-collapsed .mw-collapsible-content {
+       display: none;
+}
+
+.mw-changeslist-legend.mw-collapsed {
+       margin-bottom: 0;
+}
+
+/* Prevent pushing down the content if legend is collapsed */
+.mw-changeslist-legend.mw-collapsed ~ ul:first-of-type > li:first-child,
+.mw-changeslist-legend.mw-collapsed + h4 + div > table.mw-changeslist-line:first-child {
+       clear: right;
+}
+
+/* Hide RCFilters highlight containers if RCFilters is not enabled.
+   This is overridden in mw.ui.rcfilters.ChangesListWrapperWidget.less if RCFilters is enabled. */
+.mw-rcfilters-ui-highlights {
+       display: none;
+}