From e4f973bd4c6bb0b9c4d0d210fde18ec73c11aee4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 18 Apr 2014 16:15:01 +0200 Subject: [PATCH] vector: Do styles the ResourceLoader way 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 | 3 ++- skins/vector/screen-hd.less | 2 ++ skins/vector/screen.less | 10 ++++++++++ skins/vector/styles.less | 14 -------------- 4 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 skins/vector/screen.less delete mode 100644 skins/vector/styles.less diff --git a/resources/Resources.php b/resources/Resources.php index 8b0d675524..a3c427e0d5 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -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'], diff --git a/skins/vector/screen-hd.less b/skins/vector/screen-hd.less index 5a1fc055ba..8b286f4e1e 100644 --- a/skins/vector/screen-hd.less +++ b/skins/vector/screen-hd.less @@ -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 index 0000000000..f7b374f5be --- /dev/null +++ b/skins/vector/screen.less @@ -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 index 819286e272..0000000000 --- a/skins/vector/styles.less +++ /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"; -} -- 2.20.1