Last active
December 19, 2015 04:29
-
-
Save iamtyce/5897944 to your computer and use it in GitHub Desktop.
An ScSS image extension replace mixin designed to serve PNG files to IE8, and SVG to all other browsers
This file contains hidden or 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
// *************************** // | |
// IMAGE EXTENSION REPLACEMENT // | |
// *************************** // | |
// Use: @include image-background($image: "../lib/img/", $repeat: no-repeat, $position: center center); | |
@mixin image-background($color: transparent,$image: none,$repeat: no-repeat,$attachment: scroll,$position: center center) { | |
// Add extension to $image | |
$image: '#{$image}.#{$imageextension}'; | |
// Output the $imageextension | |
background: $color url($image) $repeat $attachment $position; | |
} |
Can do do this as a pull request, based on the IE8 opacity method I've put in?
Cheers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update
So it looks like this isn't quite working the way I wanted it to.. cracking on with a fix now, will update shortly! :)