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