Move Vector's preferences css out of screen.less
authorjrobson <jrobson@wikimedia.org>
Wed, 16 Oct 2013 17:56:34 +0000 (10:56 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Tue, 29 Oct 2013 21:10:30 +0000 (22:10 +0100)
* Move the preferences styling out of screen.less,
  no need to penalise all our users with it.
* Limited to Vector skin for time being as other skins do not play nicely
  with these styles.

Change-Id: I121b3d88945d994c9e30d96bab7548c839510276

resources/Resources.php
skins/vector/images/preferences-break.png [deleted file]
skins/vector/images/preferences-fade.png [deleted file]
skins/vector/images/preferences/break.png [new file with mode: 0644]
skins/vector/images/preferences/fade.png [new file with mode: 0644]
skins/vector/screen.less
skins/vector/special.preferences.less [new file with mode: 0644]

index ec6c71b..8809227 100644 (file)
@@ -1011,6 +1011,9 @@ return array(
                'scripts' => 'resources/mediawiki.special/mediawiki.special.preferences.js',
                'styles' => 'resources/mediawiki.special/mediawiki.special.preferences.css',
                'position' => 'top',
+               'skinStyles' => array(
+                       'vector' => 'skins/vector/special.preferences.less',
+               ),
        ),
        'mediawiki.special.recentchanges' => array(
                'scripts' => 'resources/mediawiki.special/mediawiki.special.recentchanges.js',
diff --git a/skins/vector/images/preferences-break.png b/skins/vector/images/preferences-break.png
deleted file mode 100644 (file)
index b529308..0000000
Binary files a/skins/vector/images/preferences-break.png and /dev/null differ
diff --git a/skins/vector/images/preferences-fade.png b/skins/vector/images/preferences-fade.png
deleted file mode 100644 (file)
index 638084d..0000000
Binary files a/skins/vector/images/preferences-fade.png and /dev/null differ
diff --git a/skins/vector/images/preferences/break.png b/skins/vector/images/preferences/break.png
new file mode 100644 (file)
index 0000000..b529308
Binary files /dev/null and b/skins/vector/images/preferences/break.png differ
diff --git a/skins/vector/images/preferences/fade.png b/skins/vector/images/preferences/fade.png
new file mode 100644 (file)
index 0000000..638084d
Binary files /dev/null and b/skins/vector/images/preferences/fade.png differ
index de5fd18..a882732 100644 (file)
@@ -547,104 +547,6 @@ div#footer #footer-places li {
        text-decoration: none;
 }
 
-/*
- *
- * The following code is highly modified from monobook. It would be nice if the
- * preftoc id was more human readable like preferences-toc for instance,
- * howerver this would require backporting the other skins.
- */
-
-/* Preferences */
-#preftoc {
-       /* Tabs */
-       width: 100%;
-       float: left;
-       clear: both;
-       margin: 0 !important;
-       padding: 0 !important;
-       .background-image('images/preferences-break.png');
-       background-position: bottom left;
-       background-repeat: no-repeat;
-}
-       #preftoc li {
-               /* Tab */
-               float: left;
-               margin: 0;
-               padding: 0;
-               padding-right: 1px;
-               height: 2.25em;
-               white-space: nowrap;
-               list-style-type: none;
-               list-style-image: none;
-               .background-image('images/preferences-break.png');
-               background-position: bottom right;
-               background-repeat: no-repeat;
-       }
-       /* Sadly, IE6 won't understand this */
-       #preftoc li:first-child {
-               margin-left: 1px;
-       }
-       #preftoc a,
-       #preftoc a:active {
-               display: inline-block;
-               position: relative;
-               color: @menu-link-color;
-               padding: 0.5em;
-               text-decoration: none;
-               background-image: none;
-               font-size: 0.9em;
-       }
-       #preftoc a:hover,
-       #preftoc a:focus {
-               text-decoration: underline;
-       }
-       #preftoc li.selected a {
-               .background-image('images/preferences-fade.png');
-               background-position: bottom;
-               background-repeat: repeat-x;
-               color: #333;
-               text-decoration: none;
-       }
-#preferences {
-       float: left;
-       width: 100%;
-       margin: 0;
-       margin-top: -2px;
-       clear: both;
-       border: solid 1px #ccc;
-       background-color: #fafafa;
-}
-#preferences fieldset {
-       border: none;
-       border-top: solid 1px #ccc;
-}
-#preferences fieldset.prefsection {
-       border: none;
-       padding: 0;
-       margin: 1em;
-}
-#preferences legend {
-       color: #666;
-}
-#preferences fieldset.prefsection legend.mainLegend {
-       display: none;
-}
-#preferences td {
-       padding-left: 0.5em;
-       padding-right: 0.5em;
-}
-.htmlform-tip {
-       font-size: x-small;
-       padding: .2em 2em;
-       color: #666;
-}
-#preferences div.mw-prefs-buttons {
-       padding: 1em;
-}
-#preferences div.mw-prefs-buttons input {
-       margin-right: 0.25em;
-}
-
 ul {
        list-style-type: disc;
        .list-style-image('images/bullet-icon.png');
diff --git a/skins/vector/special.preferences.less b/skins/vector/special.preferences.less
new file mode 100644 (file)
index 0000000..202c877
--- /dev/null
@@ -0,0 +1,99 @@
+@import "mediawiki.mixins";
+@import "variables";
+
+/**
+ * The following code is highly modified from monobook. It would be nice if the
+ * preftoc id was more human readable like preferences-toc for instance,
+ * howerver this would require backporting the other skins.
+ */
+
+/* Preferences */
+#preftoc {
+       /* Tabs */
+       width: 100%;
+       float: left;
+       clear: both;
+       margin: 0 !important;
+       padding: 0 !important;
+       .background-image('images/preferences/break.png');
+       background-position: bottom left;
+       background-repeat: no-repeat;
+}
+       #preftoc li {
+               /* Tab */
+               float: left;
+               margin: 0;
+               padding: 0;
+               padding-right: 1px;
+               height: 2.25em;
+               white-space: nowrap;
+               list-style-type: none;
+               list-style-image: none;
+               .background-image('images/preferences/break.png');
+               background-position: bottom right;
+               background-repeat: no-repeat;
+       }
+       /* Sadly, IE6 won't understand this */
+       #preftoc li:first-child {
+               margin-left: 1px;
+       }
+       #preftoc a,
+       #preftoc a:active {
+               display: inline-block;
+               position: relative;
+               color: @menu-link-color;
+               padding: 0.5em;
+               text-decoration: none;
+               background-image: none;
+               font-size: 0.9em;
+       }
+       #preftoc a:hover,
+       #preftoc a:focus {
+               text-decoration: underline;
+       }
+       #preftoc li.selected a {
+               .background-image('images/preferences/fade.png');
+               background-position: bottom;
+               background-repeat: repeat-x;
+               color: #333;
+               text-decoration: none;
+       }
+#preferences {
+       float: left;
+       width: 100%;
+       margin: 0;
+       margin-top: -2px;
+       clear: both;
+       border: solid 1px #ccc;
+       background-color: #fafafa;
+}
+#preferences fieldset {
+       border: none;
+       border-top: solid 1px #ccc;
+}
+#preferences fieldset.prefsection {
+       border: none;
+       padding: 0;
+       margin: 1em;
+}
+#preferences legend {
+       color: #666;
+}
+#preferences fieldset.prefsection legend.mainLegend {
+       display: none;
+}
+#preferences td {
+       padding-left: 0.5em;
+       padding-right: 0.5em;
+}
+.htmlform-tip {
+       font-size: x-small;
+       padding: .2em 2em;
+       color: #666;
+}
+#preferences div.mw-prefs-buttons {
+       padding: 1em;
+}
+#preferences div.mw-prefs-buttons input {
+       margin-right: 0.25em;
+}