Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/67909


Change subject: Remove no-margins css to only pages that use it
......................................................................

Remove no-margins css to only pages that use it

Change-Id: I5b6a6acd880bce854b3adf9a26adc7db54cf58c6
---
M includes/Resources.php
M includes/specials/SpecialMobileWatchlist.php
M includes/specials/UnlistedSpecialMobilePage.php
M less/common/mf-typography.less
A less/specials/common.less
M stylesheets/common/mf-typography.css
A stylesheets/specials/common.css
7 files changed, 17 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/09/67909/1

diff --git a/includes/Resources.php b/includes/Resources.php
index 8ea065e..4d5ca68 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -694,6 +694,12 @@
                'position' => 'top',
        ),
 
+       'mobile.specialpage.common' => 
$wgMFMobileSpecialPageResourceStyleBoilerplate + array(
+               'styles' => array(
+                       'stylesheets/specials/common.css',
+               ),
+       ),
+
        //@hack: xdevice instead of device to force this module to be last in a 
link
        'mobile.xdevice.detect' => $wgMFMobileResourceBoilerplate + array(
                'class' => 'MobileDeviceDetectModule',
diff --git a/includes/specials/SpecialMobileWatchlist.php 
b/includes/specials/SpecialMobileWatchlist.php
index d67218f..f261609 100644
--- a/includes/specials/SpecialMobileWatchlist.php
+++ b/includes/specials/SpecialMobileWatchlist.php
@@ -40,6 +40,7 @@
                        return;
                } else {
                        $output->setProperty( 'bodyClassName', 'no-margins' );
+                       $output->addModuleStyles( 'mobile.specialpage.common' );
                }
 
                if ( $view === 'feed' ) {
diff --git a/includes/specials/UnlistedSpecialMobilePage.php 
b/includes/specials/UnlistedSpecialMobilePage.php
index 82ba874..0e0ca91 100644
--- a/includes/specials/UnlistedSpecialMobilePage.php
+++ b/includes/specials/UnlistedSpecialMobilePage.php
@@ -17,6 +17,7 @@
                $specialStyleModuleName = 'mobile.' . $id . '.styles';
                $specialScriptModuleName = 'mobile.' . $id . '.scripts';
 
+               $out->addModuleStyles( 'mobile.specialpage.common' );
                if ( $rl->getModule( $specialStyleModuleName ) ) {
                        $out->addModuleStyles( $specialStyleModuleName );
                }
diff --git a/less/common/mf-typography.less b/less/common/mf-typography.less
index 9bdb9b1..d3462d4 100644
--- a/less/common/mf-typography.less
+++ b/less/common/mf-typography.less
@@ -85,12 +85,6 @@
        margin: @headingMarginTop @contentMarginRight 0 @contentMarginLeft;
 }
 
-body.no-margins {
-       #content_wrapper > .content {
-               margin: 0;
-       }
-}
-
 #content_wrapper {
        position: relative;
 
diff --git a/less/specials/common.less b/less/specials/common.less
new file mode 100644
index 0000000..2b43e8e
--- /dev/null
+++ b/less/specials/common.less
@@ -0,0 +1,6 @@
+// FIXME: not strictly common...
+body.no-margins {
+       #content_wrapper > .content {
+               margin: 0;
+       }
+}
diff --git a/stylesheets/common/mf-typography.css 
b/stylesheets/common/mf-typography.css
index 8b85399..636696d 100644
--- a/stylesheets/common/mf-typography.css
+++ b/stylesheets/common/mf-typography.css
@@ -84,9 +84,6 @@
 .content {
   margin: 14pt 23px 0 23px;
 }
-body.no-margins #content_wrapper > .content {
-  margin: 0;
-}
 #content_wrapper {
   position: relative;
 }
diff --git a/stylesheets/specials/common.css b/stylesheets/specials/common.css
new file mode 100644
index 0000000..607296d
--- /dev/null
+++ b/stylesheets/specials/common.css
@@ -0,0 +1,3 @@
+body.no-margins #content_wrapper > .content {
+  margin: 0;
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/67909
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b6a6acd880bce854b3adf9a26adc7db54cf58c6
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

Reply via email to