Created
March 4, 2013 04:31
-
-
Save makenosound/5079966 to your computer and use it in GitHub Desktop.
SASS cascades aren’t quite as smart as I wish they were
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
// 8-column grid where each columns is 12.5% | |
%grid { | |
display: inline; | |
float: left; | |
clear: none; | |
} | |
%grid-2 { | |
@extend %grid; | |
width: 25%; | |
} | |
%grid-4 { | |
@extend %grid; | |
width: 50%; | |
%grid-2 { | |
width: 50%; | |
} | |
} | |
article { | |
@extend %grid-4; | |
aside { | |
@extend %grid-2; | |
} | |
} |
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
article aside, article { | |
display: inline; | |
float: left; | |
clear: none; | |
} | |
/* This rule is redundant */ | |
article aside { | |
width: 25%; | |
} | |
article { | |
width: 50%; | |
} | |
article aside { | |
width: 50%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment