Created
January 4, 2012 02:40
-
-
Save nimbupani/1558183 to your computer and use it in GitHub Desktop.
Sample format for the new Silent Feature for Sass
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 @extend as of now | |
.small { | |
font-size: 0.9em; | |
} | |
footer, | |
article > footer { | |
@extend .small; | |
background-color: red; | |
} | |
---- | |
// Generated CSS | |
.small, | |
footer, | |
article > footer { | |
font-size: 0.9em; | |
} | |
footer, | |
article > footer { | |
background-color: red; | |
} | |
----------------------- | |
// Proposed Solution for Silent | |
@extendtemplate small { | |
font-size: 0.9em; | |
} | |
footer, | |
article > footer { | |
@extend small; // @extend can take a selector or an extend template | |
background-color: red; | |
} | |
---------------------- | |
// Proposed Solution Compiled into CSS | |
footer, | |
article > footer { | |
font-size: 0.9em; | |
} | |
footer, | |
article > footer { | |
background-color: red; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this would be rather awesome, as I often find myself giving my extendables funky names to avoid accidental extending, which I've had occur more than once :(