Created
May 18, 2014 23:02
-
-
Save pdaoust/079d6acebc46e7ab2132 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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 characters
// ---- | |
// 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