Skip to content

Commit e3807a8

Browse files
committed
Merge pull request #800 from mgreter/todo/issue_435
Add todo spec test for libsass issue 435
2 parents b385cb5 + 031e740 commit e3807a8

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.test {
2+
background-image: url("/CMS/Skins/CMS_Black/Common/radActionsSprite.png"); }
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
$skin-name: "CMS_Black";
2+
3+
$QUOTE: unquote('"');
4+
$EMPTY_STRING: unquote( "" );
5+
$SLASH: unquote("/");
6+
7+
$SKINS_PATH: unquote("/CMS/Skins");
8+
$URL_SEPARATOR: $SLASH;
9+
$URL_PREFIX: $EMPTY_STRING;
10+
$URL_SUFFIX: $EMPTY_STRING;
11+
12+
$_URL_PREFIX: $URL_PREFIX + $EMPTY_STRING;
13+
$_URL_SUFFIX: $URL_SUFFIX + $EMPTY_STRING;
14+
$_URL_SEPARATOR: $URL_SEPARATOR + $EMPTY_STRING;
15+
$_SKINS_PATH: $SKINS_PATH + $EMPTY_STRING;
16+
17+
@function webresource-image-url( $skin, $control, $file )
18+
{
19+
$_url: $EMPTY_STRING;
20+
$_path: $_SKINS_PATH $skin $control;
21+
22+
@each $_part in $_path {
23+
$_url: $_url + $_part + $_URL_SEPARATOR
24+
}
25+
26+
@return $_URL_PREFIX + $QUOTE + $_url + $file + $QUOTE + $_URL_SUFFIX;
27+
}
28+
29+
@function global-image-url( $skin, $control, $file ) {
30+
@return webresource-image-url( $skin, $control, $file );
31+
}
32+
33+
@function skin-image-url( $control, $file ) {
34+
@return global-image-url( $skin-name, $control, $file );
35+
}
36+
37+
$actions-sprite: skin-image-url( "Common", "radActionsSprite.png" );
38+
39+
.test
40+
{
41+
background-image: url( $actions-sprite );
42+
}
43+

0 commit comments

Comments
 (0)