Created
September 7, 2012 13:33
-
-
Save robtarr/3666287 to your computer and use it in GitHub Desktop.
SASS Grouping function
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
.elementA:before, | |
.elementB:before, | |
.elementA:after, | |
.elementB:after { content: ""; display: table; } | |
.elementA:after | |
.elementB:after { clear: both; } | |
.elementA, | |
.elementB { *zoom: 1; } |
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
%clearfix { | |
&:before, | |
&:after { content: ""; display: table; } | |
&:after { clear: both; } | |
{ *zoom: 1; } | |
} | |
.elementA { | |
@extend %clearfix; | |
} | |
.elementB { | |
@extned clearfix; | |
} |
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
A little help from Patrick Fulton pointed me in the direction of better understanding @extend. Exactly what I wanted. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment