Skip to content

Commit

Permalink
Add specs for content-exists in control statements
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyfer committed Mar 16, 2019
1 parent ba6bad4 commit b0d2bdf
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions spec/core_functions/content-exists/controls/controls.hrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<===> input.scss
@mixin test-content-exists() {
@if content-exists() {
@content;
}
@else {
content-exists: false;
}
}

.should-be-true {
@include test-content-exists() {
content-exists: true;
}
}

.should-be-false {
@include test-content-exists();
}

<===> output.css
.should-be-true {
content-exists: true;
}

.should-be-false {
content-exists: false;
}

0 comments on commit b0d2bdf

Please sign in to comment.