Last Updated: February 25, 2016
·
1.083K
· ameijernl

CSS (sass) clear cache for sprites!

// Global cacheBust variable
$cacheBust: '?v=20130314';

// sprite variables
$sprite-items: 'img/sprite-items.png'+$cacheBust;
$sprite-btns: 'img/sprite-btns.png'+$cacheBust;

.item {
background: url($sprite-items) no-repeat 0 0;
}

.btn {
background: url($sprite-btns) no-repeat 0 0;
}

.btn-inverse {
background: url($sprite-btns) no-repeat 0 -30px;
}