Fix #12990. Don't add 'px' to column-count. Close gh-1050.

This commit is contained in:
Bennett Sorbo 2012-12-01 14:11:56 -08:00 committed by Dave Methvin
parent 93e18922c5
commit 32842ac365
3 changed files with 16 additions and 4 deletions

View File

@ -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>

View File

@ -155,6 +155,7 @@ jQuery.extend({
// Exclude the following css properties to add px
cssNumber: {
"columnCount": true,
"fillOpacity": true,
"fontWeight": true,
"lineHeight": true,

View File

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