Skip to content

Commit 60619dc

Browse files
committed
1 parent ed299b3 commit 60619dc

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

dist/html2canvas.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1611,7 +1611,7 @@ NodeContainer.prototype.cssList = function(property, index) {
16111611
value = value[index || 0] || value[0] || 'auto';
16121612
value = value.trim().split(' ');
16131613
if (value.length === 1) {
1614-
value = [value[0], value[0]];
1614+
value = [value[0], isPercentage(value[0]) ? 'auto' : value[0]];
16151615
}
16161616
return value;
16171617
};

dist/html2canvas.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/nodecontainer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ NodeContainer.prototype.cssList = function(property, index) {
121121
value = value[index || 0] || value[0] || 'auto';
122122
value = value.trim().split(' ');
123123
if (value.length === 1) {
124-
value = [value[0], value[0]];
124+
value = [value[0], isPercentage(value[0]) ? 'auto' : value[0]];
125125
}
126126
return value;
127127
};

tests/cases/background/size.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
.container {
3030
float: left;
3131
border: 1px solid black;
32-
width: 200px;
32+
width: 150px;
3333
height: 200px;
3434
background-image: url(../../assets/image.jpg);
3535
background-size: 34px;
@@ -42,7 +42,7 @@
4242
<div class="container"></div>
4343
<div class="container" style="background-repeat: repeat-y"></div>
4444
<div class="container" style="background-repeat: repeat-x"></div>
45-
45+
<div class="container" style="background-size: 150% auto"></div>
4646
<div class="horizontal">
4747
<div style='background-size: cover;'></div>
4848
<div style='background-size: contain;'></div>

0 commit comments

Comments
 (0)