Skip to content

Commit 95053d9

Browse files
committed
Libsass 1590: Using & in @if expression
sass/libsass#1590
1 parent 1d0dfad commit 95053d9

File tree

15 files changed

+125
-0
lines changed

15 files changed

+125
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.hive h1 { color: blue; }
2+
3+
.bee h1 { color: blue; }
4+
5+
.amp h1 { color: white; }
6+
7+
.quotedamp h1 { color: blue; }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.hive h1{color:blue}.bee h1{color:blue}.amp h1{color:white}.quotedamp h1{color:blue}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.hive h1 {
2+
color: blue;
3+
}
4+
5+
.bee h1 {
6+
color: blue;
7+
}
8+
9+
.amp h1 {
10+
color: white;
11+
}
12+
13+
.quotedamp h1 {
14+
color: blue;
15+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.hive h1 {
2+
color: blue; }
3+
4+
.bee h1 {
5+
color: blue; }
6+
7+
.amp h1 {
8+
color: white; }
9+
10+
.quotedamp h1 {
11+
color: blue; }
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@mixin where($sel: null) {
2+
@if ( & == $sel ) {
3+
h1 { color: white; }
4+
} @else {
5+
h1 { color: blue; }
6+
}
7+
}
8+
.hive { @include where(); }
9+
.bee { @include where(".bee"); }
10+
.amp { @include where(&); }
11+
.quotedamp { @include where("&"); }
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.hive h1 { color: blue; }
2+
3+
.bee h1 { color: white; }
4+
5+
.queen h1 { color: blue; }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.hive h1{color:blue}.bee h1{color:white}.queen h1{color:blue}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.hive h1 {
2+
color: blue;
3+
}
4+
5+
.bee h1 {
6+
color: white;
7+
}
8+
9+
.queen h1 {
10+
color: blue;
11+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.hive h1 {
2+
color: blue; }
3+
4+
.bee h1 {
5+
color: white; }
6+
7+
.queen h1 {
8+
color: blue; }
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@mixin where($sel: null) {
2+
@if ( & == $sel ) {
3+
h1 { color: white; }
4+
} @else {
5+
h1 { color: blue; }
6+
}
7+
}
8+
.hive { @include where(); }
9+
.bee { @include where(&); }
10+
.queen { @include where("&"); }

0 commit comments

Comments
 (0)