Manual:$wgResourceLoaderLESSVars
Appearance
이 기능은 버전 1.32.0에서 완전히 제거되었습니다. |
| ResourceLoader: $wgResourceLoaderLESSVars | |
|---|---|
| 전역으로 선언 및 사용되는 LESS 변수들. |
|
| 이 변수가 소개된 버전: | 1.22.0 (Gerrit change 78669; git #Id052a04) |
| 폐지예정이 된 버전: | 1.30.0 (Gerrit change 366990; git #I61cff1d) |
| 이 변수가 사라진 버전: | 1.32.0 (Gerrit change 451648; git #If708087) |
| 허용값: | (배열) |
| 기본값: | 다음을 참고하세요: |
| 기타 설정: 알파벳 순 | 기능별 순 | |
상세
An associative array binding variable names to LESS code snippets representing their values.
미디어위키 1.31 버전에서 상호의존성을 유지할 수 없는 문제로 제거되었습니다. ResourceLoaderModule 서브클래스는 getLessVars() 메서드로 오버라이딩할 수 있습니다.
getLessVars()에 항목를 추가하는 것은 .less 파일에 @variable: value;를 써넣는 것과 결과적으로 동일합니다.
특히 문자열 형식은 이스케이프 문자를 사용해야 하며, 참조형식으로 사용되어야 합니다.
캐시가 무효화되는 것은 설정을 변경했기 때문이 아닙니다.
예시
$wgResourceLoaderLESSVars = [
'exampleFontSize' => '1em',
'exampleBlue' => '#eee',
];
기본값
| 미디어위키 버전: | 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',
];
| 미디어위키 버전: | 1.22 – 1.26 |
$wgResourceLoaderLESSVars = array();
같이 보기
ResourceLoaderGetLessVars- 기능적으로 유사한 후크이지만, 마찬가지로 제거되었습니다.