-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added unit tests for detached rulesets. #186
- Loading branch information
jurcovicovam
committed
Jun 20, 2014
1 parent
821540a
commit 1e2f3b2
Showing
18 changed files
with
217 additions
and
32 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
4 changes: 4 additions & 0 deletions
4
...resources/compile-basic-features/detached-rulesets/detached-ruleset-in-list-own-scope.css
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,4 @@ | ||
selector { | ||
property-1: passing-through; | ||
property-2: in-unlocker; | ||
} |
28 changes: 28 additions & 0 deletions
28
...esources/compile-basic-features/detached-rulesets/detached-ruleset-in-list-own-scope.less
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,28 @@ | ||
#namespace { | ||
@variable: in-unlocker; | ||
.unlocker { | ||
@detached-ruleset2: { property-2: @variable; }; | ||
} | ||
} | ||
#namespace > .unlocker(); | ||
|
||
@detached-ruleset1: { property-1: @variable; }; | ||
@list: @detached-ruleset1 @detached-ruleset2; | ||
|
||
.mixin(@list) { | ||
@detached1: extract(@list, 1); | ||
@detached1(); | ||
@detached2: extract(@list, 2); | ||
@detached2(); | ||
} | ||
|
||
.indirect-mixin(@list) { | ||
@variable: passing-through; | ||
.mixin(@list); | ||
} | ||
|
||
selector { | ||
@variable: in-caller; | ||
.indirect-mixin(@list) | ||
} | ||
|
3 changes: 3 additions & 0 deletions
3
...urces/compile-basic-features/detached-rulesets/detached-ruleset-in-list-passed-around.css
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,3 @@ | ||
selector { | ||
property: passing-through; | ||
} |
18 changes: 18 additions & 0 deletions
18
...rces/compile-basic-features/detached-rulesets/detached-ruleset-in-list-passed-around.less
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,18 @@ | ||
@detached-ruleset1: { property: 1; }; | ||
@detached-ruleset2: { property: @variable; }; | ||
@list: @detached-ruleset1 @detached-ruleset2; | ||
|
||
.mixin(@list) { | ||
@detached: extract(@list, 2); | ||
@detached(); | ||
} | ||
|
||
.indirect-mixin(@list) { | ||
@variable: passing-through; | ||
.mixin(@list); | ||
} | ||
|
||
selector { | ||
@variable: in-caller; | ||
.indirect-mixin(@list) | ||
} |
3 changes: 3 additions & 0 deletions
3
...ources/compile-basic-features/detached-rulesets/detached-ruleset-in-lists-lists-scope.css
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,3 @@ | ||
selector { | ||
property-1: in-list-unlocker; | ||
} |
21 changes: 21 additions & 0 deletions
21
...urces/compile-basic-features/detached-rulesets/detached-ruleset-in-lists-lists-scope.less
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,21 @@ | ||
@detached-ruleset1: { property-1: @variable; }; | ||
.list-namespacer { | ||
@variable: in-list-unlocker; | ||
.listUnlocker { | ||
@list: @detached-ruleset1 something-else; | ||
} | ||
} | ||
|
||
.mixin(@list) { | ||
@detached1: extract(@list, 1); | ||
@detached1(); | ||
} | ||
|
||
.indirect-mixin(@list) { | ||
.mixin(@list); | ||
} | ||
|
||
selector { | ||
.list-namespacer > .listUnlocker(); | ||
.indirect-mixin(@list) | ||
} |
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
4 changes: 4 additions & 0 deletions
4
...esources/compile-basic-features/detached-rulesets/detached-rulesets-errors-additional.css
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,4 @@ | ||
//does not exists | ||
.does-not-exists { | ||
!#error#! | ||
} |
2 changes: 2 additions & 0 deletions
2
...esources/compile-basic-features/detached-rulesets/detached-rulesets-errors-additional.err
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,2 @@ | ||
Errors produced by compilation of testCase | ||
ERROR 3:2 Could not find detached ruleset for "@does-not-exists". |
4 changes: 4 additions & 0 deletions
4
...sources/compile-basic-features/detached-rulesets/detached-rulesets-errors-additional.less
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,4 @@ | ||
//does not exists | ||
.does-not-exists { | ||
@does-not-exists(); | ||
} |
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 |
---|---|---|
|
@@ -33,4 +33,4 @@ | |
b: { | ||
color: red; | ||
}; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -3,4 +3,7 @@ | |
} | ||
.selector-indirect { | ||
color: #ff0000; | ||
} | ||
.multiple-imports .selector { | ||
scope: yes; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
@keyframes /* 1 */ sunrise { | ||
h1 { | ||
color: #ff00ff; | ||
} | ||
.wrap-selector { | ||
visible-one: visible; | ||
} |
Oops, something went wrong.