vector: Do styles the ResourceLoader way
authorBartosz Dziewoński <matma.rex@gmail.com>
Fri, 18 Apr 2014 14:15:01 +0000 (16:15 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Fri, 18 Apr 2014 19:23:34 +0000 (21:23 +0200)
It used to be done like this a few releases ago, but went
through some perturbation when the LESS rewrite happened
and afterwards during beta-testing the typography refresh.

The current way causes enough issues that I think the gain
from getting rid of it is worth losing some brevity.

Bug: 56592
Change-Id: Ibeff450fad789fbc67d95a1a9befd315f7405421

resources/Resources.php
skins/vector/screen-hd.less
skins/vector/screen.less [new file with mode: 0644]
skins/vector/styles.less [deleted file]

index 8b0d675..a3c427e 100644 (file)
@@ -135,7 +135,8 @@ return array(
        'skins.vector.styles' => array(
                // Used in the web installer. Test it after modifying this definition!
                'styles' => array(
-                       'vector/styles.less',
+                       'vector/screen.less' => array( 'media' => 'screen' ),
+                       'vector/screen-hd.less' => array( 'media' => 'screen and (min-width: 982px)' ),
                ),
                'remoteBasePath' => $GLOBALS['wgStylePath'],
                'localBasePath' => $GLOBALS['wgStyleDirectory'],
index 5a1fc05..8b286f4 100644 (file)
@@ -1,5 +1,7 @@
 /* Vector screen styles for high definition displays */
 
+@import "variables.less";
+
 div#content {
        margin-left: 11em;
        padding: 1.25em 1.5em 1.5em 1.5em;
diff --git a/skins/vector/screen.less b/skins/vector/screen.less
new file mode 100644 (file)
index 0000000..f7b374f
--- /dev/null
@@ -0,0 +1,10 @@
+/* Vector screen styles */
+
+@import "variables.less";
+
+@import "components/common.less";
+@import "components/animations.less";
+@import "components/navigation.less";
+@import "components/footer.less";
+@import 'components/notifications.less';
+@import "components/externalLinks.less";
diff --git a/skins/vector/styles.less b/skins/vector/styles.less
deleted file mode 100644 (file)
index 819286e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-@import "variables.less";
-
-@media screen {
-       @import "components/common.less";
-       @import "components/animations.less";
-       @import "components/navigation.less";
-       @import "components/footer.less";
-       @import 'components/notifications.less';
-       @import "components/externalLinks.less";
-}
-
-@media screen and (min-width: 982px) {
-       @import "screen-hd.less";
-}