Skip to content

Commit c7e766c

Browse files
committed
Add specs for content-exists in control statements
See sass/libsass#2842
1 parent ba6bad4 commit c7e766c

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<===> input.scss
2+
@mixin test-content-exists() {
3+
@if content-exists() {
4+
@content;
5+
}
6+
@else {
7+
content-exists: false;
8+
}
9+
}
10+
11+
.should-be-true {
12+
@include test-content-exists();
13+
}
14+
15+
.should-be-false {
16+
@include test-content-exists() {
17+
content-exists: true;
18+
}
19+
}
20+
21+
<===> output.css
22+
.should-be-true {
23+
content-exists: true;
24+
}
25+
26+
.should-be-false {
27+
content-exists: false;
28+
}

0 commit comments

Comments
 (0)