This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
Omphaloskepsis/plugins/jetpack/scss/_utilities/mixins/_image-replacement.scss

13 lines
546 B
SCSS
Raw Permalink Normal View History

2018-03-21 18:19:20 +00:00
// ==========================================================================
// Image replacement
// ==========================================================================
@mixin image-replacement($url, $width, $height) {
// I totally stole this idea from Marcel Shields.
// Read his article: http://css-tricks.com/replace-the-image-in-an-img-with-css/
display: block;
width: $width; // Width of new image
height: $height; // Height of new image
padding-left: $width; // Equal to width of new image
background: url($url) no-repeat;
}