Created
May 31, 2014 16:42
-
-
Save jbrains/32a7874da44ef830751f to your computer and use it in GitHub Desktop.
How do I remove the duplication in these SCSS rules?
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
a.comment-link { | |
/* Superimposed image */ | |
$icon-comment-height: 10px; /* Must match the size of the graphic */ | |
$icon-comment-width: 10px; /* Must match the size of the graphic */ | |
background: $salmon url(../images/comment.gif) no-repeat $icon-comment-height $icon-comment-width; | |
color: $salmon; | |
&:hover { | |
background: $dark-salmon url(../images/comment.gif) no-repeat $icon-comment-height $icon-comment-width; | |
color: $dark-salmon; | |
text-decoration: none; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the example. I like the notion of abstracting the color; I'm refactoring, so I'm not there yet.