Created
February 15, 2013 12:14
-
-
Save jitendravyas/4960057 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com, the Sass playground.
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
// Sass v3.2.7 | |
//How can I get hover position without calculating it manually? | |
//My aim was to create a mixin to save time by not repeating the code for hover | |
//and value of hover | |
@mixin spriting-position($offset-x, $offset-y) { | |
background-position:$offset-x $offset-y; | |
&:hover{ | |
$hover-offset-x: $offset-x + 75; | |
background-position: $hover-offset-x $offset-y; | |
} | |
} | |
.hotel-filter-sprite-All { | |
@include spriting-position(100px, 14px); | |
} | |
// .hotel-filter-sprite-luxury{ | |
// @include spriting-position(200, 14px); | |
//} | |
// .hotel-filter-sprite-Boutique-hotel{ | |
// @include spriting-position(300px, 14px); | |
// } | |
// .hotel-filter-sprite-Camp{ | |
// @include spriting-position(400px, 14px); | |
// } |
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
.hotel-filter-sprite-All { | |
background-position: 100px 14px; | |
} | |
.hotel-filter-sprite-All:hover { | |
background-position: 175px 14px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment