aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBennett Sorbo <bsorbo@gmail.com>2012-12-01 14:11:56 -0800
committerDave Methvin <dave.methvin@gmail.com>2012-12-11 22:38:37 -0500
commit32842ac36564e9db60bcf8ad841674b161e7c924 (patch)
tree640c315f671faa7072cbc430408704ad8152fc39
parent93e18922c5b6f6c1472cc0b44c65c70603d57cdd (diff)
downloadjquery-32842ac36564e9db60bcf8ad841674b161e7c924.tar.gz
jquery-32842ac36564e9db60bcf8ad841674b161e7c924.zip
Fix #12990. Don't add 'px' to column-count. Close gh-1050.
-rw-r--r--AUTHORS.txt2
-rw-r--r--src/css.js1
-rw-r--r--test/unit/css.js17
3 files changed, 16 insertions, 4 deletions
diff --git a/AUTHORS.txt b/AUTHORS.txt
index 834b1163a..639ed4b64 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -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>
+ \ 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("<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() {