Created
August 2, 2014 18:01
-
-
Save davidtheclark/fb51878bce26e6e21e8c to your computer and use it in GitHub Desktop.
Revisions
-
davidtheclark created this gist
Aug 2, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,85 @@ // ---- // libsass (v2.0.0) // ---- @mixin first { /* first mixin was included */ body { font-size: 100px; } } @mixin second { /* second mixin was included */ body { line-height: 2; } } @mixin third { /* third mixin was included */ body { background-color: pink; } } @mixin everything-but ($exclude: false) { /* The following mixins SHOULD NOT be included: #{$exclude} */ /* first index: #{index($exclude, first)} */ /* second index: #{index($exclude, second)} */ /* third index: #{index($exclude, third)} */ @if not(index($exclude, first)) { @include first; } @if not(index($exclude, second)) { @include second; } @if not(index($exclude, third)) { @include third; } } @mixin everything-specified ($include: false) { /* The following mixins SHOULD be included: #{$include} */ /* first index: #{index($include, first)} */ /* second index: #{index($include, second)} */ /* third index: #{index($include, third)} */ @if (index($include, first)) { @include first; } @if (index($include, second)) { @include second; } @if (index($include, third)) { @include third; } } /* ================== * EVERYTHING BUT */ @include everything-but(first second); /* ================== * EVERYTHING SPECIFIED */ @include everything-specified(first second); /* ================== * IF-NOT TEST * Does simple if-not syntax work? */ $tester: false; @if $tester { p { font-size: 30px; } /* No, if not didn't work. */ } @if not $tester { p { font-size: 30px; } /* Yes, if-not did work. */ } This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ /* ================== * EVERYTHING BUT */ /* The following mixins SHOULD NOT be included: first second */ /* first index: 1 */ /* second index: 2 */ /* third index: false */ /* third mixin was included */ body { background-color: pink; } /* ================== * EVERYTHING SPECIFIED */ /* The following mixins SHOULD be included: first second */ /* first index: 1 */ /* second index: 2 */ /* third index: false */ /* first mixin was included */ body { font-size: 100px; } /* second mixin was included */ body { line-height: 2; } /* ================== * IF-NOT TEST * Does simple if-not syntax work? */ p { font-size: 30px; } /* Yes, if-not did work. */