Skip to content

Instantly share code, notes, and snippets.

@davidtheclark
Created August 2, 2014 18:01
Show Gist options
  • Save davidtheclark/fb51878bce26e6e21e8c to your computer and use it in GitHub Desktop.
Save davidtheclark/fb51878bce26e6e21e8c to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// 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. */
}
/* ==================
* 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. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment