Skip to content

Instantly share code, notes, and snippets.

@stowball
Created April 1, 2014 08:38
Show Gist options
  • Select an option

  • Save stowball/9910272 to your computer and use it in GitHub Desktop.

Select an option

Save stowball/9910272 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.2.17)
// Compass (v0.12.4)
// ----
@mixin extend($class: foo, $extend: true) {
@if $extend {
@extend %#{$class};
}
@else {
@if ($class == clear) {
clear: both;
}
@else if ($class == border-box) {
box-sizing: border-box;
}
}
}
%clear {
@include extend(clear, false);
}
%border-box {
@include extend(border-box, false);
}
.clear {
@include extend(clear);
}
@media (min-width: 100px) {
.clear-in-mq {
@include extend(clear, false);
}
}
.border-box {
@include extend(border-box);
}
.another-border-box {
@include extend(border-box);
}
@media (min-width: 100px) {
.border-box-in-mq {
@include extend(border-box, false);
}
}
.clear {
clear: both;
}
.border-box, .another-border-box {
box-sizing: border-box;
}
@media (min-width: 100px) {
.clear-in-mq {
clear: both;
}
}
@media (min-width: 100px) {
.border-box-in-mq {
box-sizing: border-box;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment