Created
October 16, 2013 15:11
-
-
Save greylabel/7009272 to your computer and use it in GitHub Desktop.
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 child-behind-parent() | |
* | |
* Moves a child img behind it's a parent. Apply to parent div. Markup: div > a > img | |
* Useful for putting a hover image on the a tag wrapping an image | |
* | |
*/ | |
@mixin child-overlay($image){ | |
position: relative; | |
z-index: 1; | |
a{ | |
display: block; | |
position: relative; | |
@include background(image-url("#{$image}") center no-repeat); | |
&:hover{ | |
@include background-size(16%); //possibly use transform instead | |
} | |
img{ | |
position: relative; | |
z-index: -1; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment