Skip to content

Instantly share code, notes, and snippets.

@nimbupani
Created January 4, 2012 02:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nimbupani/1558183 to your computer and use it in GitHub Desktop.
Save nimbupani/1558183 to your computer and use it in GitHub Desktop.
Sample format for the new Silent Feature for Sass
// 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;
}
@seutje
Copy link

seutje commented Jan 4, 2012

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 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment