Permalink
Browse files

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

  • Loading branch information...
bsorbo authored and dmethvin committed Dec 1, 2012
1 parent 93e1892 commit 32842ac36564e9db60bcf8ad841674b161e7c924
Showing with 16 additions and 4 deletions.
  1. +2 −0 AUTHORS.txt
  2. +1 −0 src/css.js
  3. +13 −4 test/unit/css.js
View
@@ -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
@@ -155,6 +155,7 @@ jQuery.extend({
// Exclude the following css properties to add px
cssNumber: {
+ "columnCount": true,
"fillOpacity": true,
"fontWeight": true,
"lineHeight": true,
View
@@ -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() {

0 comments on commit 32842ac

Please sign in to comment.