Created
March 21, 2014 13:11
-
-
Save veewee/9685863 to your computer and use it in GitHub Desktop.
Add a background-image to the element and this mixin will make sure that the image is cropped and displayed nicely.
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 crop-and-center-background-image($width, $height) { | |
display: block; | |
width: $width; | |
height: $height; | |
background-position: center center; | |
background-size: cover; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment