mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fix #12990. Don't add 'px' to column-count. Close gh-1050.
This commit is contained in:
parent
93e18922c5
commit
32842ac365
@ -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>
|
||||
|
@ -155,6 +155,7 @@ jQuery.extend({
|
||||
|
||||
// Exclude the following css properties to add px
|
||||
cssNumber: {
|
||||
"columnCount": true,
|
||||
"fillOpacity": true,
|
||||
"fontWeight": true,
|
||||
"lineHeight": true,
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user