Skip to content

Instantly share code, notes, and snippets.

@pdaoust
Created May 18, 2014 23:02
Show Gist options
  • Save pdaoust/079d6acebc46e7ab2132 to your computer and use it in GitHub Desktop.
Save pdaoust/079d6acebc46e7ab2132 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
@mixin extend($name) {
@if $extend and ($extend == advanced or length($corral-stack) == 0) {
$placeholder-name: "";
@if not map-has-key($placeholders, $name) {
$placeholders: map-merge($placeholders, ($name: ())) !global;
}
$placeholders-for-name: map-get($placeholders, $name);
@if not map-has-key($placeholders-for-name, $corral-stack) {
$placeholder-name: "#{$name}-#{unique-id()}";
$placeholders-for-name: map-merge($placeholders-for-name, ($corral-stack: $placeholder-name));
$placeholders: map-merge($placeholders, ($name: $placeholders-for-name)) !global;
@at-root %#{$placeholder-name} {
@content;
}
} @else {
$placeholder-name: map-get($placeholders-for-name, $corral-stack);
}
& {
@extend %#{$placeholder-name};
}
} @else {
@content;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment