Skip to content

Commit 5eef591

Browse files
rwaldrontimmywil
authored andcommitted
Landing pull request 409. Adds fillOpacity to internal cssNumber. Fixes #9548.
More Details: - jquery#409 - http://bugs.jquery.com/ticket/9548
1 parent 13ceb0f commit 5eef591

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

src/css.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ jQuery.extend({
5050

5151
// Exclude the following css properties to add px
5252
cssNumber: {
53-
"zIndex": true,
53+
"fillOpacity": true,
5454
"fontWeight": true,
55-
"opacity": true,
56-
"zoom": true,
5755
"lineHeight": true,
56+
"opacity": true,
57+
"orphans": true,
5858
"widows": true,
59-
"orphans": true
59+
"zIndex": true,
60+
"zoom": true
6061
},
6162

6263
// Add in properties whose names you wish to fix before

test/unit/css.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,3 +475,13 @@ test("widows & orphans #8936", function () {
475475

476476
$p.remove();
477477
});
478+
479+
test("Do not append px to 'fill-opacity' #9548", 1, function() {
480+
481+
var $div = jQuery("<div>").appendTo("#qunit-fixture");
482+
483+
$div.css("fill-opacity", 0).animate({ "fill-opacity": 1.0 }, 0, function () {
484+
equal( jQuery(this).css("fill-opacity"), 1, "Do not append px to 'fill-opacity'");
485+
});
486+
487+
});

0 commit comments

Comments
 (0)