Created
November 9, 2012 00:35
-
-
Save hatefulcrawdad/4042933 to your computer and use it in GitHub Desktop.
Placeholder Classes
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 for placeholder classes | |
%fancy-container { | |
@include box-shadow(0 0 10px rgba(0,0,0,0.2)); | |
@include border-radius(4px); | |
background: #eee; | |
border: solid 1px #ddd; | |
} | |
%fancier-container { | |
@include box-shadow(0 0 10px rgba(20,20,150,0.1)); | |
border-width: 2px; | |
} | |
#news { | |
@extend %fancy-container; | |
} | |
#articles { | |
@extend %fancy-container; | |
@extend %fancier-container; | |
} | |
// This outputs CSS using the @extend rule. So whatever styles are inside that class get transfered to whatever you want. | |
#news, | |
#articles { | |
@include box-shadow(0 0 10px rgba(0,0,0,0.2)); | |
@include border-radius(4px); | |
background: #eee; | |
border: solid 1px #ddd; | |
} | |
#articles { | |
@include box-shadow(0 0 10px rgba(20,20,150,0.1)); | |
border-width: 2px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment