-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Experimental support for mixins with interpolated selectors.
- Loading branch information
1 parent
3818727
commit 002d6db
Showing
3 changed files
with
124 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.foo { | ||
a: 1; | ||
} | ||
.foo { | ||
a: 2; | ||
} | ||
#foo { | ||
a: 3; | ||
} | ||
#foo { | ||
a: 4; | ||
} | ||
mi-test-a { | ||
a: 1; | ||
a: 2; | ||
a: 3; | ||
a: 4; | ||
} | ||
.b .bb.foo-xxx .yyy-foo#foo .foo.bbb { | ||
b: 1; | ||
} | ||
mi-test-b { | ||
b: 1; | ||
} | ||
#foo-foo > .bar .baz { | ||
c: c; | ||
} | ||
mi-test-c-1 > .bar .baz { | ||
c: c; | ||
} | ||
mi-test-c-2 .baz { | ||
c: c; | ||
} | ||
mi-test-c-3 { | ||
c: c; | ||
} | ||
mi-test-d { | ||
gender: "Male"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
|
||
@a1: foo; | ||
@a2: ~".foo"; | ||
@a4: ~"#foo"; | ||
|
||
.@{a1} { | ||
a: 1; | ||
} | ||
|
||
@{a2} { | ||
a: 2; | ||
} | ||
|
||
#@{a1} { | ||
a: 3; | ||
} | ||
|
||
@{a4} { | ||
a: 4; | ||
} | ||
|
||
mi-test-a { | ||
.foo; | ||
#foo; | ||
} | ||
|
||
.b .bb { | ||
&.@{a1}-xxx .yyy-@{a1}@{a4} { | ||
& @{a2}.bbb { | ||
b: 1; | ||
} | ||
} | ||
} | ||
|
||
mi-test-b { | ||
.b.bb.foo-xxx.yyy-foo#foo.foo.bbb; | ||
} | ||
|
||
@c1: @a1; | ||
@c2: bar; | ||
@c3: baz; | ||
|
||
#@{c1}-foo { | ||
> .@{c2} { | ||
.@{c3} { | ||
c: c; | ||
} | ||
} | ||
} | ||
|
||
mi-test-c { | ||
&-1 {#foo-foo;} | ||
&-2 {#foo-foo > .bar;} | ||
&-3 {#foo-foo > .bar.baz;} | ||
} | ||
|
||
.Person(@name, @gender_) { | ||
.@{name} { | ||
@gender: @gender_; | ||
.sayGender() { | ||
gender: @gender; | ||
} | ||
} | ||
} | ||
|
||
mi-test-d { | ||
.Person(person, "Male"); | ||
.person.sayGender(); | ||
} |