Sass mixin for graphic buttons [non-sprite version]
The code:
@mixin graphic-bg($src)
background-image: url($src)
width: image-width($src)
height: image-height($src)
background-repeat: no-repeat
And typical use:
+graphic-bg('../img/fbloginsmall.png')
It requires to setup your image directory in config.
Written by Artur Szott
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Sass
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#