mirror of
https://github.com/less/less.js.git
synced 2026-05-01 03:00:22 -04:00
Merge branch 'namespaces-guards-1418' of github.com:SomMeri/less-rhino.js into SomMeri-namespaces-guards-1418
This commit is contained in:
@@ -91,3 +91,11 @@
|
||||
.mixin-generated-class {
|
||||
a: 1;
|
||||
}
|
||||
#guarded-caller {
|
||||
guarded: namespace;
|
||||
silent: namespace;
|
||||
guarded: with default;
|
||||
}
|
||||
#guarded-deeper {
|
||||
should: match 1;
|
||||
}
|
||||
|
||||
@@ -171,3 +171,58 @@
|
||||
}
|
||||
|
||||
#ns > .mixin-for-root-usage(1);
|
||||
|
||||
@namespaceGuard: 1;
|
||||
#guarded when (@namespaceGuard>0) {
|
||||
#deeper {
|
||||
.mixin() {
|
||||
guarded: namespace;
|
||||
}
|
||||
}
|
||||
}
|
||||
#guarded() when (@namespaceGuard>0) {
|
||||
#deeper {
|
||||
.mixin() {
|
||||
silent: namespace;
|
||||
}
|
||||
}
|
||||
}
|
||||
#guarded(@variable) when (@namespaceGuard>0) {
|
||||
#deeper {
|
||||
.mixin() {
|
||||
should: not match because namespace argument;
|
||||
}
|
||||
}
|
||||
}
|
||||
#guarded(@variable: default) when (@namespaceGuard>0) {
|
||||
#deeper {
|
||||
.mixin() {
|
||||
guarded: with default;
|
||||
}
|
||||
}
|
||||
}
|
||||
#guarded when (@namespaceGuard<0) {
|
||||
#deeper {
|
||||
.mixin() {
|
||||
should: not match because namespace guard;
|
||||
}
|
||||
}
|
||||
}
|
||||
#guarded-caller {
|
||||
#guarded > #deeper > .mixin();
|
||||
}
|
||||
#top {
|
||||
#deeper when (@namespaceGuard<0) {
|
||||
.mixin(@a) {
|
||||
should: not match because namespace guard;
|
||||
}
|
||||
}
|
||||
#deeper() when (@namespaceGuard>0) {
|
||||
.mixin(@a) {
|
||||
should: match @a;
|
||||
}
|
||||
}
|
||||
}
|
||||
#guarded-deeper {
|
||||
#top > #deeper > .mixin(1);
|
||||
}
|
||||
Reference in New Issue
Block a user