Merge 'skins.timeless.misc' back into 'skins.timeless'

Follows-up f450f7e13 and 1bb12ffaae which introduce and
explaine that module's need based on what I believe was a
misunderstanding.

Specifying an options object (e.g. with a "media" key) is optional
for a stylesheet, and a module can have any number of CSS or LESS
files that are packaged together. The syntax for this was designed
for PHP and unfortunately does not translate elegantly to JSON,
but it does work. In PHP, examples of this can be found that look
as follows:

 'styles' => [
   'foo.css',
   'bar.css' => [ 'media' => 'print' ],
   'quux.css',
 ],

Other examples of this in JSON can be found in Nostalgia.git
and ArticlePlaceholder.git.

Change-Id: Ie2a39a79c0892a1c5699a05071216eb5fe660bc1
isekai
Timo Tijhof 6 years ago committed by Isarra
parent 9206ada9b7
commit 8ddbd36d25

@ -28,10 +28,6 @@ class SkinTimeless extends SkinTemplate {
$out->addModuleStyles( [
'mediawiki.skinning.content.externallinks',
'skins.timeless',
// This is a separate module from skins.timeless because it has its own
// @media declarations in its less, and apparently modules cannot be defined
// with both. That is the only reason.
'skins.timeless.misc'
] );
$out->addModules( [
'skins.timeless.js',

@ -2,7 +2,7 @@
/**
* ResourceLoader module to set some LESS variables for the skin
*/
class TimelessVariablesModule extends ResourceLoaderFileModule {
class TimelessVariablesModule extends ResourceLoaderSkinModule {
/**
* Add our LESS variables
*

@ -50,19 +50,13 @@
"resources/screen-mobile.less": {
"media": "screen and (max-width: 850px)"
},
"0": "resources/screen-misc.less",
"resources/print.css": {
"media": "print"
}
},
"@NOTE": "Remember to also update variables.less if you change the width cutoffs here. screen-misc.less and mobile.js may also need updating."
},
"skins.timeless.misc": {
"targets": [ "desktop", "mobile" ],
"class": "ResourceLoaderSkinModule",
"styles": [
"resources/screen-misc.less"
]
},
"skins.timeless.js": {
"targets": [ "desktop" ],
"scripts": [

Loading…
Cancel
Save