1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
$base-path:'../images/';
$base-attr:'data-';
@function url($src, $path:''){
@return unquote('url('+$base-path + $path+ $src +')');
}
@function url2($src, $path:''){
@return unquote('url('+ $base-path + $path+ $src +')');
}
@function attr($arg1, $arg2:''){
@return unquote('attr('+$base-attr + $arg1 + $arg2 +')');
}
div {
background: url('image.png');
background: url('image.png','img/');
background: url2('image.png','img/');
&:after {
content: attr(value);
content: attr(value, -extra);
content: url('icon.png');
content: url('icon.png','gfx/');
content: url2('icon.png','gfx/');
}
}
|