Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/213802
Change subject: Sandbox alpha and beta styles from stable
......................................................................
Sandbox alpha and beta styles from stable
This moves all styles that get loaded in the head into
separate ResourceLoader modules.
I've left any .alpha, .beta class usage in JavaScript modules
and special pages since they do not matter so much.
Bug: T98400
Change-Id: I08eb91094f36e07b36e2351054c89f608d384c17
---
M includes/Resources.php
A less/common.beta.less
M less/common.less
M less/content/hacks.less
M less/pageactions.beta.less
M less/tablet/common.beta.less
M less/tablet/common.less
M less/tablet/hacks.beta.less
M less/ui.alpha.less
M less/ui.less
10 files changed, 72 insertions(+), 75 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/02/213802/1
diff --git a/includes/Resources.php b/includes/Resources.php
index f035b62..5171ae7 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -186,6 +186,7 @@
'skins.minerva.beta.styles' => $wgMFResourceFileModuleBoilerplate +
array(
'position' => 'top',
'styles' => array(
+ 'less/common.beta.less',
'less/pageactions.beta.less',
'less/footer.beta.less',
'less/content/main.beta.less',
diff --git a/less/common.beta.less b/less/common.beta.less
new file mode 100644
index 0000000..92f7446
--- /dev/null
+++ b/less/common.beta.less
@@ -0,0 +1,6 @@
+.alpha,
+.beta {
+ .last-modified-bar {
+ margin-top: 1.5em;
+ }
+}
diff --git a/less/common.less b/less/common.less
index 7ab389e..ff65983 100644
--- a/less/common.less
+++ b/less/common.less
@@ -71,12 +71,6 @@
.last-modified-bar {
font-size: .9em;
}
-.alpha,
-.beta {
- .last-modified-bar {
- margin-top: 1.5em;
- }
-}
// For Minerva desktop
#toc,
diff --git a/less/content/hacks.less b/less/content/hacks.less
index 2758582..8b59640 100644
--- a/less/content/hacks.less
+++ b/less/content/hacks.less
@@ -12,13 +12,6 @@
@import "minerva.variables";
@import "minerva.mixins";
-// Hide the infobox in alpha JS mode
-.client-js .alpha {
- .infobox {
- display: none;
- }
-}
-
.content {
// Hide links such as `Wikisource has original works on the topic
dinosaur (use wikidata instead)
.sistersitebox,
diff --git a/less/pageactions.beta.less b/less/pageactions.beta.less
index 03772a4..40e9656 100644
--- a/less/pageactions.beta.less
+++ b/less/pageactions.beta.less
@@ -44,6 +44,17 @@
}
}
+.alpha,
+.beta {
+ #page-secondary-actions {
+ &:before {
+ content: "";
+ display: block;
+ clear: both;
+ }
+ }
+}
+
@media all and (max-width: @wgMFDeviceWidthTablet) {
.alpha,
.beta {
diff --git a/less/tablet/common.beta.less b/less/tablet/common.beta.less
index 5537749..a2fba42 100644
--- a/less/tablet/common.beta.less
+++ b/less/tablet/common.beta.less
@@ -27,6 +27,25 @@
margin-right: auto;
padding: 5px @contentPaddingTablet;
}
+
+ .pre-content {
+ padding-left: @contentPaddingTablet;
+ padding-right: @contentPaddingTablet;
+
+ #section_0 {
+ border-bottom: none;
+ // FIXME: After this and the new page-action
CSS below are promoted to stable,
+ // move page-actions before the h1 in the DOM,
remove the 220px padding on the
+ // header, and change the absolute positioning
of page-actions to float.
+ padding: 0 220px 7px 0;
+ font-size: 2.6525em; // 42px
+ }
+ }
+ #page-actions {
+ right: @contentPaddingTablet;
+ top: 36px;
+ padding: 0;
+ }
}
.beta {
diff --git a/less/tablet/common.less b/less/tablet/common.less
index 0baf557..dea744b 100644
--- a/less/tablet/common.less
+++ b/less/tablet/common.less
@@ -108,26 +108,4 @@
#mw-mf-last-modified {
padding: 5px @contentPaddingTablet;
}
-
- .alpha,
- .beta {
- .pre-content {
- padding-left: @contentPaddingTablet;
- padding-right: @contentPaddingTablet;
-
- #section_0 {
- border-bottom: none;
- // FIXME: After this and the new page-action
CSS below are promoted to stable,
- // move page-actions before the h1 in the DOM,
remove the 220px padding on the
- // header, and change the absolute positioning
of page-actions to float.
- padding: 0 220px 7px 0;
- font-size: 2.6525em; // 42px
- }
- }
- #page-actions {
- right: @contentPaddingTablet;
- top: 36px;
- padding: 0;
- }
- }
}
diff --git a/less/tablet/hacks.beta.less b/less/tablet/hacks.beta.less
index cf17f34..bafa52e 100644
--- a/less/tablet/hacks.beta.less
+++ b/less/tablet/hacks.beta.less
@@ -14,3 +14,10 @@
}
}
}
+
+// Hide the infobox in alpha JS mode
+.client-js .alpha {
+ .infobox {
+ display: none;
+ }
+}
diff --git a/less/ui.alpha.less b/less/ui.alpha.less
index 977de1e..e731e59 100644
--- a/less/ui.alpha.less
+++ b/less/ui.alpha.less
@@ -30,3 +30,31 @@
}
}
+// FIXME: identify why this is here.
+.alpha {
+ .spinner {
+ margin: auto;
+ }
+}
+
+.alpha {
+ .header {
+ background-color: #fff;
+ position: relative;
+
+ > .header-title {
+ // align the text in the middle regardless of whether
the notification icon exists or not
+ bottom: 0;
+ left: @headerHeight;
+ position: absolute;
+ right: @headerHeight;
+ text-align: center;
+ top: 0;
+ a {
+ display: block;
+ line-height: @headerHeight;
+ text-decoration: none;
+ }
+ }
+ }
+}
diff --git a/less/ui.less b/less/ui.less
index cfda712..cf6761b 100644
--- a/less/ui.less
+++ b/less/ui.less
@@ -312,46 +312,6 @@
}
}
-// FIXME: identify why this is here.
-.alpha {
- .spinner {
- margin: auto;
- }
-}
-
-.alpha {
- .header {
- background-color: #fff;
- position: relative;
-
- > .header-title {
- // align the text in the middle regardless of whether
the notification icon exists or not
- bottom: 0;
- left: @headerHeight;
- position: absolute;
- right: @headerHeight;
- text-align: center;
- top: 0;
- a {
- display: block;
- line-height: @headerHeight;
- text-decoration: none;
- }
- }
- }
-}
-
-.alpha,
-.beta {
- #page-secondary-actions {
- &:before {
- content: "";
- display: block;
- clear: both;
- }
- }
-}
-
.client-nojs {
// alpha uses a magnifying glass as the search button so it doesn't
need this styling
.stable,
--
To view, visit https://gerrit.wikimedia.org/r/213802
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I08eb91094f36e07b36e2351054c89f608d384c17
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits