Created
January 5, 2011 21:51
-
-
Save cararemixed/767085 to your computer and use it in GitHub Desktop.
pattern matching specialization
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
@mixin some_sprite($state) { | |
background-image: url(...); | |
/* etc... */ | |
} | |
@mixin some_sprite(default) { | |
background-position: 0px 18px; | |
} | |
@mixin some_sprite(hover) { | |
background-position: 18px 18px; | |
} | |
// somewhere down the line .......... | |
.thingy { | |
@include some_sprite(default); | |
} | |
.thingy:hover { | |
@include some_sprite(hover); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment