Handbuch:$wgResourceLoaderLESSVars
Appearance
Diese Funktion wurde in der Version 1.32.0 vollständig entfernt. |
ResourceLoader: $wgResourceLoaderLESSVars | |
---|---|
Globale LESS-Variablen. |
|
Eingeführt in Version: | 1.22.0 (Gerrit change 78669; git #Id052a04) |
Veraltet in Version: | 1.30.0 (Gerrit change 366990; git #I61cff1d) |
Entfernt in Version: | 1.32.0 (Gerrit change 451648; git #If708087) |
Erlaubte Werte: | (Array) |
Standardwert: | Siehe unten |
Andere Einstellungen: Alphabetisch | Nach Funktion |
Details
An associative array binding variable names to LESS code snippets representing their values.
Removed in v1.31 due to concerns about allowing unmaintainable cross-dependencies. Custom ResourceLoaderModule
subclasses can override the getLessVars()
method instead.
Adding an item here is equivalent to writing @variable: value;
at the beginning of all your .less files, with all the consequences.
In particular, string values must be escaped and quoted.
Changes to this configuration do NOT trigger cache invalidation.
Beispiel
$wgResourceLoaderLESSVars = [
'exampleFontSize' => '1em',
'exampleBlue' => '#eee',
];
Standardwert
MediaWiki Versions: | 1.27 – 1.31 |
$wgResourceLoaderLESSVars = [
/**
* Minimum available screen width at which a device can be considered a tablet
* The number is currently based on the device width of a Samsung Galaxy S5 mini and is low
* enough to cover iPad (768px). Number is prone to change with new information.
* @since 1.27
* @deprecated 1.31 Use mediawiki.ui/variables instead
*/
'deviceWidthTablet' => '720px',
];
MediaWiki Versions: | 1.22 – 1.26 |
$wgResourceLoaderLESSVars = array();
Siehe auch
- ResourceLoaderGetLessVars - a hook with similar functionality (now also removed)