Created
October 23, 2014 14:37
-
-
Save adamsir/8b81ea034b360e889831 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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 characters
// ---- | |
// libsass (v3.0) | |
// ---- | |
// Mixins | |
@mixin extend($class:'&') { | |
@if ($class != '&') { | |
.#{$class} { | |
@content | |
} | |
} @else { | |
& { | |
@content | |
} | |
} | |
} | |
// Demo | |
.link { | |
text-decoration: underline; | |
@include extend() { | |
color: white; | |
background :red; | |
} | |
} | |
.pivo { | |
background: black; | |
&:first-child { | |
color: pink; | |
} | |
} | |
@include extend('pivo') { | |
display: block; | |
&:last-child { | |
display: none; | |
} | |
} |
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 characters
.link { | |
text-decoration: underline; } | |
.link { | |
color: white; | |
background: red; } | |
.pivo { | |
background: black; } | |
.pivo:first-child { | |
color: pink; } | |
.pivo { | |
display: block; } | |
.pivo:last-child { | |
display: none; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment