From: Bennett Sorbo Date: Sat, 1 Dec 2012 22:11:56 +0000 (-0800) Subject: Fix #12990. Don't add 'px' to column-count. Close gh-1050. X-Git-Tag: 1.9.0b1~30 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=32842ac36564e9db60bcf8ad841674b161e7c924;p=jquery.git Fix #12990. Don't add 'px' to column-count. Close gh-1050. --- diff --git a/AUTHORS.txt b/AUTHORS.txt index 834b1163a..639ed4b64 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -155,3 +155,5 @@ Marcel Greter Matthias Jäggli Yiming He Devin Cooper +Bennett Sorbo + \ No newline at end of file diff --git a/src/css.js b/src/css.js index 18ca9c831..963822a68 100644 --- a/src/css.js +++ b/src/css.js @@ -155,6 +155,7 @@ jQuery.extend({ // Exclude the following css properties to add px cssNumber: { + "columnCount": true, "fillOpacity": true, "fontWeight": true, "lineHeight": true, diff --git a/test/unit/css.js b/test/unit/css.js index e27d5b615..092be7e09 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -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("
").appendTo("#qunit-fixture"); - var $div = jQuery("
").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() {