| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Support !important in nested mixins | mediawiki/libs/less.php | master | +12 -2 |
Details
Details
Related Changes in Gerrit:
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | None | T288498 Update less.php port to support Less.js 3.13 behaviours | |||
| Resolved | Hokwelum | T365481 Update less.php port to complete support Less.js 2.5.3 behaviours | |||
| Resolved | Hokwelum | T353141 [mixins-important] Support "!important" for mixins that have nested parameters. |
Event Timeline
Comment Actions
The !important flag on mixin call prevented proper evaluation of variables inside nested mixins. See #2394
.size(@aaa: auto) {
.set-width(@aaa) {
width: @aaa;
}
.set-width(@aaa);
}
.when-calling-nested-issue-2394 {
.size() !important;
}
.when-calling-nested-with-param-issue-2394 {
.size(10px) !important;
}The above returns an error:
PHP Fatal error: Uncaught Less_Exception_Compiler: variable @aaa is undefined in file ..test.less in test.less on line 4, column 11
2| .size(@aaa: auto) {
3| .set-width(@aaa) {
4| width: @aaa;
5| }
6| .set-width(@aaa);
7| }Comment Actions
Change 991880 had a related patch set uploaded (by Hokwelum; author: Hokwelum):
[mediawiki/libs/less.php@master] Support !important in nested mixins
Comment Actions
Change 991880 merged by jenkins-bot:
[mediawiki/libs/less.php@master] Support !important in nested mixins