Skip to content

Commit

Permalink
Add spec for url() munging
Browse files Browse the repository at this point in the history
  • Loading branch information
jakob-e authored and xzyfer committed Nov 26, 2014
1 parent a164ef0 commit 28351d9
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 9 deletions.
12 changes: 12 additions & 0 deletions spec/libsass-todo-issues/issue_674/expected_output.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
div {
background: url(../images/image.png);
background: url(../images/img/image.png);
background: url(../images/img/image.png);
}
div:after {
content: attr(data-value);
content: attr(data-value-extra);
content: url(../images/icon.png);
content: url(../images/gfx/icon.png);
content: url(../images/gfx/icon.png);
}
27 changes: 27 additions & 0 deletions spec/libsass-todo-issues/issue_674/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,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/');
}
}
9 changes: 0 additions & 9 deletions spec/maps/keywords/input.scss

This file was deleted.

0 comments on commit 28351d9

Please sign in to comment.