Last Updated: February 25, 2016
·
704
· arturszott

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.