Manual:$wgResourceLoaderLESSVars/zh
From Linux Web Expert
File:OOjs UI icon alert-destructive.svg | <translate> This feature was removed completely in version <tvar name=ver>1.32.0</tvar>.</translate> |
<translate> ResourceLoader</translate>: $wgResourceLoaderLESSVars | |
---|---|
全域LESS变量。 |
|
<translate> Introduced in version:</translate> | 1.22.0 (Gerrit change 78669; git #Id052a04) |
<translate> Deprecated in version:</translate> | 1.30.0 (Gerrit change 366990; git #I61cff1d) |
<translate> Removed in version:</translate> | 1.32.0 (Gerrit change 451648; git #If708087) |
<translate> Allowed values:</translate> | (数组) |
<translate> Default value:</translate> | 参见下方 |
<translate> Other settings:</translate> <translate> Alphabetical</translate> | <translate> By function</translate> |
细节
将变量名称绑定到代表其值的LESS代码段的关联数组。
该变量已在1.31版本中删除,原因是担心存在不可维护的交叉依赖关系。自定义ResourceLoaderModule
子类可以替代getLessVars()
方法。
在此处添加项目等同于在所有.less文件的开头写入@variable:value;
,具有所有后果。
特别是必须对字符串值进行转义和引用。
对该配置所做的更改不会触发缓存失效。
-{zh-hans:示例; zh-hant:範例;}-
$wgResourceLoaderLESSVars = [
'exampleFontSize' => '1em',
'exampleBlue' => '#eee',
];
默认值
<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.31</tvar> is unsupported version</translate>"> 1.27 – 1.31
<translate> MediaWiki versions:</translate> |
$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',
];
1.22 – 1.26
<translate> MediaWiki versions:</translate> |
$wgResourceLoaderLESSVars = array();
See also
- ResourceLoaderGetLessVars - a hook with similar functionality (now also removed)
Categories:
- MediaWiki configuration settings/zh
- MediaWiki configuration settings introduced in version 1.22.0/zh
- MediaWiki configuration settings deprecated in version 1.30.0/zh
- MediaWiki configuration settings removed in version 1.32.0/zh
- Pages with broken file links
- MediaWiki deprecated or obsolete features/zh
- Resource loader variables/zh