-
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.
Fixes #1421 - re-parses variable-interpolated elements to selectors (…
…no.2) (#3227) * Fix element to selector list conversion, passing all tests! * Add passing test from #3098 * Added passing test example from #1817 * Allow lists to be re-evaluated as selectors (Fixes #1694)
- Loading branch information
1 parent
7a12d2f
commit b8140d4
Showing
10 changed files
with
192 additions
and
38 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
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
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
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,36 @@ | ||
input[type=text]:focus, | ||
input[type=email]:focus, | ||
input[type=password]:focus, | ||
textarea:focus { | ||
foo: bar; | ||
} | ||
.a + .z, | ||
.b + .z, | ||
.c + .z { | ||
color: blue; | ||
} | ||
.bar .d.a, | ||
.bar .b, | ||
.c.bar:hover, | ||
.bar baz { | ||
color: blue; | ||
} | ||
.a + .e, | ||
.b.c + .e, | ||
.d + .e { | ||
foo: bar; | ||
} | ||
input[class="text"], | ||
input.text { | ||
background: red; | ||
} | ||
.master-page-1 .selector-1, | ||
.master-page-1 .selector-2 { | ||
background-color: red; | ||
} | ||
.fruit-apple, | ||
.fruit-satsuma, | ||
.fruit-banana, | ||
.fruit-pear { | ||
content: "Just a test."; | ||
} |
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,53 @@ | ||
@inputs: input[type=text], input[type=email], input[type=password], textarea; | ||
|
||
@{inputs} { | ||
&:focus { | ||
foo: bar; | ||
} | ||
} | ||
|
||
@classes: .a, .b, .c; | ||
|
||
@{classes} { | ||
+ .z { | ||
color: blue; | ||
} | ||
} | ||
|
||
.bar { | ||
.d@{classes}&:hover, baz { | ||
color: blue; | ||
} | ||
} | ||
|
||
@c: ~'.a, .b'; | ||
@d: ~'.c, .d'; | ||
@e: ~' + .e'; | ||
|
||
@{c}@{d} { | ||
@{e} { | ||
foo: bar; | ||
} | ||
} | ||
|
||
@textClasses: ~'&[class="text"], &.text'; | ||
|
||
input { | ||
@{textClasses} { | ||
background: red; | ||
} | ||
} | ||
|
||
@my-selector: ~'.selector-1, .selector-2'; | ||
.master-page-1 { | ||
@{my-selector} { | ||
background-color: red; | ||
} | ||
} | ||
|
||
@list: apple, satsuma, banana, pear; | ||
@{list} { | ||
.fruit-& { | ||
content: "Just a test."; | ||
} | ||
} |