directory-encoder
Advanced tools
Comparing version 0.3.3 to 0.3.4
@@ -77,3 +77,3 @@ /*global require:true*/ | ||
customselectors: this.customselectors[ name ] | ||
}, css; | ||
}, css = ""; | ||
@@ -83,3 +83,8 @@ if( this.template ){ | ||
} else { | ||
css = this.prefix + name + | ||
for( var i in data.customselectors ){ | ||
if( data.customselectors.hasOwnProperty( i ) ){ | ||
css += data.customselectors[i] + ",\n"; | ||
} | ||
} | ||
css += this.prefix + name + | ||
" { background-image: url('" + | ||
@@ -86,0 +91,0 @@ datauri + |
{ | ||
"name": "directory-encoder", | ||
"description": "Encode a directory of images to CSS", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"homepage": "https://github.com/filamentgroup/directory-encoder", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -111,2 +111,11 @@ /*global require:true*/ | ||
}); | ||
this.encoder6 = new Constructor( "test/directory-files", | ||
"test/output/encoded3.css", | ||
{ | ||
prefix: ".icon-", | ||
customselectors: { | ||
"*": [".icon-$1:before", ".icon-$1-what", ".hey-$1"], | ||
"foo": [".icon-2"] | ||
} | ||
}); | ||
done(); | ||
@@ -169,2 +178,15 @@ }, | ||
test.done(); | ||
}, | ||
withCustomSelectAllnoTemplate: function( test ){ | ||
test.equal( this.encoder6._css("foo", "bar"), | ||
".icon-2,\n" + | ||
".icon-foo:before,\n" + | ||
".icon-foo-what,\n" + | ||
".hey-foo,\n" + | ||
".icon-foo { " + | ||
"background-image: url('bar'); " + | ||
"background-repeat: no-repeat;" + | ||
"}" ); | ||
test.done(); | ||
} | ||
@@ -171,0 +193,0 @@ }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32127
530