Created
October 28, 2011 19:24
-
-
Save ltackett/1323223 to your computer and use it in GitHub Desktop.
Evented Sass
This file contains hidden or 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
| /* === source: === */ | |
| @mixin some-mixin { | |
| overflow: hidden; | |
| width: 200px; | |
| @trigger "callback"; /* Trigger an event */ | |
| } | |
| .box { | |
| @include some-mixin; /* Call the mixin */ | |
| @bind "callback" { overflow: visible; } /* Use the triggered event to override something. */ | |
| } | |
| /* === output: === */ | |
| .box { | |
| width: 200px; | |
| overflow: visible; /* No wasteful output. */ | |
| } |
This file contains hidden or 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
| /* === source: === */ | |
| @mixin some-mixin { | |
| overflow: hidden; | |
| width: 200px; | |
| @trigger "callback"; /* Trigger an event */ | |
| } | |
| .box { | |
| @include some-mixin; /* Call the mixin */ | |
| @bind "callback" { margin: 0 auto; } /* Use the triggered event to extend something. */ | |
| } | |
| /* === output: === */ | |
| .box { | |
| overflow: hidden; | |
| width: 200px; | |
| margin: 0 auto; /* Extended output. */ | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment