Skip to content

Commit

Permalink
修改sag时候不自动添加background-size
Browse files Browse the repository at this point in the history
  • Loading branch information
bugluo authored and bugluo committed Sep 28, 2016
1 parent 478ce38 commit 0b74bf0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function lazyImageCSS(options) {
declarations.push(newDeclaration);
}

if (options.backgroundSize && options.retina && !code['background-size'] && !code['-webkit-background-size']) {
if (options.backgroundSize && (options.retina || info.type == 'svg') && !code['background-size'] && !code['-webkit-background-size']) {
newDeclaration = setProperty('background-size', width);
declarations.push(newDeclaration);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gulp-lazyimagecss",
"version": "2.0.2",
"version": "2.0.3",
"dependencies": {
"async": "^1.5.0",
"css": "^2.2.1",
Expand Down

0 comments on commit 0b74bf0

Please sign in to comment.