Skip to content

Commit b0d2bdf

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

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

File renamed without changes.
File renamed without changes.
Lines changed: 28 additions & 0 deletions
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+
content-exists: true;
14+
}
15+
}
16+
17+
.should-be-false {
18+
@include test-content-exists();
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)