Created
July 7, 2016 04:54
-
-
Save AnthonyDS/ce349d592c74ca92c54c8325e83f3e90 to your computer and use it in GitHub Desktop.
Passing Content Blocks to a Mixin
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
/* | |
* SCSS | |
*/ | |
@mixin apply-to-ie6-only { | |
* html { | |
@content; | |
} | |
} | |
@include apply-to-ie6-only { | |
#logo { | |
background-image: url(logo.gif); | |
} | |
} | |
/* | |
* SASS | |
*/ | |
=apply-to-ie6-only | |
* html | |
@content | |
+apply-to-ie6-only | |
#logo | |
background-image: url(logo.gif) | |
/* | |
* Result | |
*/ | |
* html #logo { | |
background-image: url(logo.gif); | |
} | |
//... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment