Skip to content

Commit

Permalink
Fix #12990. Don't add 'px' to column-count. Close gh-1050.
Browse files Browse the repository at this point in the history
  • Loading branch information
bsorbo authored and dmethvin committed Dec 12, 2012
1 parent 93e1892 commit 32842ac
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 2 additions & 0 deletions AUTHORS.txt
Expand Up @@ -155,3 +155,5 @@ Marcel Greter <marcel.greter@ocbnet.ch>
Matthias Jäggli <matthias.jaeggli@gmail.com>
Yiming He <yiminghe@gmail.com>
Devin Cooper <cooper.semantics@gmail.com>
Bennett Sorbo <bsorbo@gmail.com>

1 change: 1 addition & 0 deletions src/css.js
Expand Up @@ -155,6 +155,7 @@ jQuery.extend({

// Exclude the following css properties to add px
cssNumber: {
"columnCount": true,
"fillOpacity": true,
"fontWeight": true,
"lineHeight": true,
Expand Down
17 changes: 13 additions & 4 deletions test/unit/css.js
Expand Up @@ -823,11 +823,20 @@ if ( jQuery.fn.offset ) {
});
}

test("Do not append px to 'fill-opacity' #9548", function() {
expect( 1 );
test("Do not append px (#9548, #12990)", function() {
expect( 2 );

var $div = jQuery("<div>").appendTo("#qunit-fixture");

var $div = jQuery("<div>").appendTo("#qunit-fixture").css("fill-opacity", 1);
equal( $div.css("fill-opacity"), 1, "Do not append px to 'fill-opacity'");
$div.css( "fill-opacity", 1 );
equal( $div.css("fill-opacity"), 1, "Do not append px to 'fill-opacity'" );

$div.css( "column-count", 1 );
if ( $div.css("column-count") ) {
equal( $div.css("column-count"), 1, "Do not append px to 'column-count'" );
} else {
ok( true, "No support for column-count CSS property" );
}
});

test("css('width') and css('height') should respect box-sizing, see #11004", function() {
Expand Down

0 comments on commit 32842ac

Please sign in to comment.