Jdlrobson has submitted this change and it was merged.
Change subject: Cleanup: Introduce mobilediff.css
......................................................................
Cleanup: Introduce mobilediff.css
Currently a large chunk of watchlist.css is not used by the watchlist
Move it into mobilediff.css
Change-Id: Icf7b19cf7051896b15642ce22dbbb75c9479bf98
---
M MobileFrontend.php
M less/mf-mixins.less
A less/specials/mobilediff.less
M less/specials/watchlist.less
A stylesheets/specials/mobilediff.css
M stylesheets/specials/watchlist.css
6 files changed, 309 insertions(+), 311 deletions(-)
Approvals:
Jdlrobson: Verified; Looks good to me, approved
diff --git a/MobileFrontend.php b/MobileFrontend.php
index 6b786a7..e84f72f 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -512,6 +512,7 @@
$wgResourceModules['mobile.mobilediff.styles'] =
$wgMFMobileSpecialPageResourceBoilerplate + array(
'styles' => array(
'stylesheets/specials/watchlist.css',
+ 'stylesheets/specials/mobilediff.css',
),
);
// FIXME: temporary hack to get round CentralAuth logout screen
diff --git a/less/mf-mixins.less b/less/mf-mixins.less
index bc7137d..7956f0e 100644
--- a/less/mf-mixins.less
+++ b/less/mf-mixins.less
@@ -1,5 +1,12 @@
@import "mf-variables.less";
+.watchlist-heading() {
+ font: inherit;
+ margin: 0;
+ font-weight: bold;
+ color: #404040;
+}
+
.ajaxLoader() {
background-image: @ajaxLoadingImage;
min-height: 48px;
diff --git a/less/specials/mobilediff.less b/less/specials/mobilediff.less
new file mode 100644
index 0000000..3d4bb14
--- /dev/null
+++ b/less/specials/mobilediff.less
@@ -0,0 +1,164 @@
+@import "../mf-mixins.less";
+
+#mw-mf-diffview {
+ @userInfoHeight: 5em;
+
+ h2 {
+ .watchlist-heading();
+ a {
+ color: inherit;
+ }
+ }
+
+ .mw-mf-bytesremoved,
+ .mw-mf-bytesadded {
+ padding-left: 1.5em;
+ .background-size( 1em, 1em );
+ background-position: left center;
+ background-repeat: no-repeat;
+ display: inline-block;
+ line-height: 1em;
+ }
+
+ .mw-mf-bytesadded {
+ color: #008a46;
+ background-image: url(images/positive.png);
+ }
+
+ .mw-mf-bytesremoved {
+ color: #b24242;
+ background-image: url(images/negative.png);
+ }
+
+ ins,
+ del {
+ display: block;
+ padding-left: 8px;
+ }
+
+ ins::before {
+ content: "+ ";
+ }
+
+ del::before {
+ content: "- ";
+ }
+
+ #mw-mf-userinfo .mw-mf-roles,
+ .mw-mf-diff-date,
+ .mw-mf-bytesremoved,
+ .mw-mf-bytesadded {
+ font-size: 0.7em;
+ text-transform: uppercase;
+ }
+
+ .mw-mf-diff-date {
+ font-size: 0.5em;
+ color: #c6c6c6;
+ }
+
+ ins {
+ color: #008a46;
+ text-decoration: none;
+ }
+
+ del {
+ color: #b24242;
+ text-decoration: strikethrough;
+ }
+
+ #mw-mf-diffarea {
+ padding: 1em 1em (2 * @userInfoHeight + 1em);
+ }
+
+ #mw-mf-diff-info {
+ line-height: 1em;
+ padding-bottom: 1em;
+ }
+
+ #mw-mf-diff-comment {
+ padding-bottom: 1em;
+ font-style: italic;
+ }
+
+ #mw-mf-userinfo {
+ position: relative;
+ height: @userInfoHeight;
+ padding: 1em;
+ background-color: #f0f0f0;
+ border-top: solid 1px #c0c0c0;
+
+ &::before {
+ content: "";
+ position: absolute;
+ top: -10px;
+ left: 19px;
+ border-width: 0px 11px 10px;
+ border-style: solid;
+ border-color: #c0c0c0 transparent;
+ display: block;
+ width: 0;
+ }
+
+ &::after {
+ content: "";
+ position: absolute;
+ top: -9px;
+ left: 20px;
+ border-width: 0px 10px 10px;
+ border-style: solid;
+ border-color: #f0f0f0 transparent;
+ display: block;
+ width: 0;
+ }
+
+ .mw-mf-user {
+ line-height: 14px;
+ }
+
+ .mw-mf-edit-count {
+ display: inline-block;
+ text-align: center;
+ margin-top: 1.2em;
+ color: #333;
+ font-size: 0.7em;
+ text-transform: uppercase;
+ line-height: 1;
+
+ /* the edit count number */
+ div {
+ font-size: 1.85em;
+ color: #888;
+ }
+ }
+ }
+}
+
+.alpha {
+ #mw-mf-diffview {
+ ins,
+ del {
+ color: black;
+ }
+
+ ins {
+ background-color: #ddffdd;
+ }
+
+ del {
+ background-color: #ffdddd;
+ text-decoration: none;
+ }
+ }
+}
+
+.supportsPositionFixed {
+ #mw-mf-diffview {
+ #mw-mf-userinfo {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ }
+ }
+}
diff --git a/less/specials/watchlist.less b/less/specials/watchlist.less
index e3c3db9..88a6b31 100644
--- a/less/specials/watchlist.less
+++ b/less/specials/watchlist.less
@@ -1,16 +1,5 @@
@import "../mf-mixins.less";
-.watchlistHeading() {
- font: inherit;
- margin: 0;
- font-weight: bold;
- color: #404040;
-
- a {
- color: inherit;
- }
-}
-
.mw-mf-watchlist-selector {
border-bottom: 1px solid #e2e2e2;
@@ -97,7 +86,7 @@
}
h2 {
- .watchlistHeading();
+ .watchlist-heading();
// 22px is the width of the watchlist star, +2px for
additional padding
padding: 20px 24px 0 0;
}
@@ -119,166 +108,6 @@
li {
a.title {
padding-left: (@thumbSpace - @ragWidth);
- }
- }
-}
-
-#mw-mf-diffview {
- @userInfoHeight: 5em;
-
- h2 {
- .watchlistHeading();
- }
-
- .mw-mf-bytesremoved,
- .mw-mf-bytesadded {
- padding-left: 1.5em;
- .background-size( 1em, 1em );
- background-position: left center;
- background-repeat: no-repeat;
- display: inline-block;
- line-height: 1em;
- }
-
- .mw-mf-bytesadded {
- color: #008a46;
- background-image: url(images/positive.png);
- }
-
- .mw-mf-bytesremoved {
- color: #b24242;
- background-image: url(images/negative.png);
- }
-
- ins,
- del {
- display: block;
- padding-left: 8px;
- }
-
- ins::before {
- content: "+ ";
- }
-
- del::before {
- content: "- ";
- }
-
- #mw-mf-userinfo .mw-mf-roles,
- .mw-mf-diff-date,
- .mw-mf-bytesremoved,
- .mw-mf-bytesadded {
- font-size: 0.7em;
- text-transform: uppercase;
- }
-
- .mw-mf-diff-date {
- font-size: 0.5em;
- color: #c6c6c6;
- }
-
- ins {
- color: #008a46;
- text-decoration: none;
- }
-
- del {
- color: #b24242;
- text-decoration: strikethrough;
- }
-
- #mw-mf-diffarea {
- padding: 1em 1em (2 * @userInfoHeight + 1em);
- }
-
- #mw-mf-diff-info {
- line-height: 1em;
- padding-bottom: 1em;
- }
-
- #mw-mf-diff-comment {
- padding-bottom: 1em;
- font-style: italic;
- }
-
- #mw-mf-userinfo {
- position: relative;
- height: @userInfoHeight;
- padding: 1em;
- background-color: #f0f0f0;
- border-top: solid 1px #c0c0c0;
-
- &::before {
- content: "";
- position: absolute;
- top: -10px;
- left: 19px;
- border-width: 0px 11px 10px;
- border-style: solid;
- border-color: #c0c0c0 transparent;
- display: block;
- width: 0;
- }
-
- &::after {
- content: "";
- position: absolute;
- top: -9px;
- left: 20px;
- border-width: 0px 10px 10px;
- border-style: solid;
- border-color: #f0f0f0 transparent;
- display: block;
- width: 0;
- }
-
- .mw-mf-user {
- line-height: 14px;
- }
-
- .mw-mf-edit-count {
- display: inline-block;
- text-align: center;
- margin-top: 1.2em;
- color: #333;
- font-size: 0.7em;
- text-transform: uppercase;
- line-height: 1;
-
- /* the edit count number */
- div {
- font-size: 1.85em;
- color: #888;
- }
- }
- }
-}
-
-.alpha {
- #mw-mf-diffview {
- ins,
- del {
- color: black;
- }
-
- ins {
- background-color: #ddffdd;
- }
-
- del {
- background-color: #ffdddd;
- text-decoration: none;
- }
- }
-}
-
-.supportsPositionFixed {
- #mw-mf-diffview {
- #mw-mf-userinfo {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
}
}
}
diff --git a/stylesheets/specials/mobilediff.css
b/stylesheets/specials/mobilediff.css
new file mode 100644
index 0000000..032329d
--- /dev/null
+++ b/stylesheets/specials/mobilediff.css
@@ -0,0 +1,136 @@
+#mw-mf-diffview h2 {
+ font: inherit;
+ margin: 0;
+ font-weight: bold;
+ color: #404040;
+}
+#mw-mf-diffview h2 a {
+ color: inherit;
+}
+#mw-mf-diffview .mw-mf-bytesremoved,
+#mw-mf-diffview .mw-mf-bytesadded {
+ padding-left: 1.5em;
+ /* use -webkit prefix for older android browsers eg. nexus 1 */
+
+ -moz-background-size: 1em 1em;
+ -o-background-size: 1em 1em;
+ -webkit-background-size: 1em 1em;
+ background-size: 1em 1em;
+ background-position: left center;
+ background-repeat: no-repeat;
+ display: inline-block;
+ line-height: 1em;
+}
+#mw-mf-diffview .mw-mf-bytesadded {
+ color: #008a46;
+ background-image: url(images/positive.png);
+}
+#mw-mf-diffview .mw-mf-bytesremoved {
+ color: #b24242;
+ background-image: url(images/negative.png);
+}
+#mw-mf-diffview ins,
+#mw-mf-diffview del {
+ display: block;
+ padding-left: 8px;
+}
+#mw-mf-diffview ins::before {
+ content: "+ ";
+}
+#mw-mf-diffview del::before {
+ content: "- ";
+}
+#mw-mf-diffview #mw-mf-userinfo .mw-mf-roles,
+#mw-mf-diffview .mw-mf-diff-date,
+#mw-mf-diffview .mw-mf-bytesremoved,
+#mw-mf-diffview .mw-mf-bytesadded {
+ font-size: 0.7em;
+ text-transform: uppercase;
+}
+#mw-mf-diffview .mw-mf-diff-date {
+ font-size: 0.5em;
+ color: #c6c6c6;
+}
+#mw-mf-diffview ins {
+ color: #008a46;
+ text-decoration: none;
+}
+#mw-mf-diffview del {
+ color: #b24242;
+ text-decoration: strikethrough;
+}
+#mw-mf-diffview #mw-mf-diffarea {
+ padding: 1em 1em 11em;
+}
+#mw-mf-diffview #mw-mf-diff-info {
+ line-height: 1em;
+ padding-bottom: 1em;
+}
+#mw-mf-diffview #mw-mf-diff-comment {
+ padding-bottom: 1em;
+ font-style: italic;
+}
+#mw-mf-diffview #mw-mf-userinfo {
+ position: relative;
+ height: 5em;
+ padding: 1em;
+ background-color: #f0f0f0;
+ border-top: solid 1px #c0c0c0;
+}
+#mw-mf-diffview #mw-mf-userinfo::before {
+ content: "";
+ position: absolute;
+ top: -10px;
+ left: 19px;
+ border-width: 0px 11px 10px;
+ border-style: solid;
+ border-color: #c0c0c0 transparent;
+ display: block;
+ width: 0;
+}
+#mw-mf-diffview #mw-mf-userinfo::after {
+ content: "";
+ position: absolute;
+ top: -9px;
+ left: 20px;
+ border-width: 0px 10px 10px;
+ border-style: solid;
+ border-color: #f0f0f0 transparent;
+ display: block;
+ width: 0;
+}
+#mw-mf-diffview #mw-mf-userinfo .mw-mf-user {
+ line-height: 14px;
+}
+#mw-mf-diffview #mw-mf-userinfo .mw-mf-edit-count {
+ display: inline-block;
+ text-align: center;
+ margin-top: 1.2em;
+ color: #333;
+ font-size: 0.7em;
+ text-transform: uppercase;
+ line-height: 1;
+ /* the edit count number */
+
+}
+#mw-mf-diffview #mw-mf-userinfo .mw-mf-edit-count div {
+ font-size: 1.85em;
+ color: #888;
+}
+.alpha #mw-mf-diffview ins,
+.alpha #mw-mf-diffview del {
+ color: black;
+}
+.alpha #mw-mf-diffview ins {
+ background-color: #ddffdd;
+}
+.alpha #mw-mf-diffview del {
+ background-color: #ffdddd;
+ text-decoration: none;
+}
+.supportsPositionFixed #mw-mf-diffview #mw-mf-userinfo {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+}
diff --git a/stylesheets/specials/watchlist.css
b/stylesheets/specials/watchlist.css
index 624bb2e..804f28f 100644
--- a/stylesheets/specials/watchlist.css
+++ b/stylesheets/specials/watchlist.css
@@ -88,9 +88,6 @@
color: #404040;
padding: 20px 24px 0 0;
}
-ul.mw-mf-watchlist-results li h2 a {
- color: inherit;
-}
ul.mw-mf-watchlist-results li .mw-mf-time {
color: #c6c6c6;
font-size: .6em;
@@ -102,142 +99,6 @@
}
ul.mw-mf-watchlist-results.a-to-z li a.title {
padding-left: 77px;
-}
-#mw-mf-diffview h2 {
- font: inherit;
- margin: 0;
- font-weight: bold;
- color: #404040;
-}
-#mw-mf-diffview h2 a {
- color: inherit;
-}
-#mw-mf-diffview .mw-mf-bytesremoved,
-#mw-mf-diffview .mw-mf-bytesadded {
- padding-left: 1.5em;
- /* use -webkit prefix for older android browsers eg. nexus 1 */
-
- -moz-background-size: 1em 1em;
- -o-background-size: 1em 1em;
- -webkit-background-size: 1em 1em;
- background-size: 1em 1em;
- background-position: left center;
- background-repeat: no-repeat;
- display: inline-block;
- line-height: 1em;
-}
-#mw-mf-diffview .mw-mf-bytesadded {
- color: #008a46;
- background-image: url(images/positive.png);
-}
-#mw-mf-diffview .mw-mf-bytesremoved {
- color: #b24242;
- background-image: url(images/negative.png);
-}
-#mw-mf-diffview ins,
-#mw-mf-diffview del {
- display: block;
- padding-left: 8px;
-}
-#mw-mf-diffview ins::before {
- content: "+ ";
-}
-#mw-mf-diffview del::before {
- content: "- ";
-}
-#mw-mf-diffview #mw-mf-userinfo .mw-mf-roles,
-#mw-mf-diffview .mw-mf-diff-date,
-#mw-mf-diffview .mw-mf-bytesremoved,
-#mw-mf-diffview .mw-mf-bytesadded {
- font-size: 0.7em;
- text-transform: uppercase;
-}
-#mw-mf-diffview .mw-mf-diff-date {
- font-size: 0.5em;
- color: #c6c6c6;
-}
-#mw-mf-diffview ins {
- color: #008a46;
- text-decoration: none;
-}
-#mw-mf-diffview del {
- color: #b24242;
- text-decoration: strikethrough;
-}
-#mw-mf-diffview #mw-mf-diffarea {
- padding: 1em 1em 11em;
-}
-#mw-mf-diffview #mw-mf-diff-info {
- line-height: 1em;
- padding-bottom: 1em;
-}
-#mw-mf-diffview #mw-mf-diff-comment {
- padding-bottom: 1em;
- font-style: italic;
-}
-#mw-mf-diffview #mw-mf-userinfo {
- position: relative;
- height: 5em;
- padding: 1em;
- background-color: #f0f0f0;
- border-top: solid 1px #c0c0c0;
-}
-#mw-mf-diffview #mw-mf-userinfo::before {
- content: "";
- position: absolute;
- top: -10px;
- left: 19px;
- border-width: 0px 11px 10px;
- border-style: solid;
- border-color: #c0c0c0 transparent;
- display: block;
- width: 0;
-}
-#mw-mf-diffview #mw-mf-userinfo::after {
- content: "";
- position: absolute;
- top: -9px;
- left: 20px;
- border-width: 0px 10px 10px;
- border-style: solid;
- border-color: #f0f0f0 transparent;
- display: block;
- width: 0;
-}
-#mw-mf-diffview #mw-mf-userinfo .mw-mf-user {
- line-height: 14px;
-}
-#mw-mf-diffview #mw-mf-userinfo .mw-mf-edit-count {
- display: inline-block;
- text-align: center;
- margin-top: 1.2em;
- color: #333;
- font-size: 0.7em;
- text-transform: uppercase;
- line-height: 1;
- /* the edit count number */
-
-}
-#mw-mf-diffview #mw-mf-userinfo .mw-mf-edit-count div {
- font-size: 1.85em;
- color: #888;
-}
-.alpha #mw-mf-diffview ins,
-.alpha #mw-mf-diffview del {
- color: black;
-}
-.alpha #mw-mf-diffview ins {
- background-color: #ddffdd;
-}
-.alpha #mw-mf-diffview del {
- background-color: #ffdddd;
- text-decoration: none;
-}
-.supportsPositionFixed #mw-mf-diffview #mw-mf-userinfo {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
}
.mw-mf-user {
padding: 1px 0 0 20px;
--
To view, visit https://gerrit.wikimedia.org/r/52934
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Icf7b19cf7051896b15642ce22dbbb75c9479bf98
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: awjrichards <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits