From bb05db32438f676a5d9418f2de7d5af179b23394 Mon Sep 17 00:00:00 2001 From: Arthur Verschaeve Date: Thu, 2 Apr 2015 18:17:23 +0200 Subject: [PATCH] jQuery.cssNumber: add entry --- entries/jQuery.cssHooks.xml | 2 +- entries/jQuery.cssNumber.xml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 entries/jQuery.cssNumber.xml diff --git a/entries/jQuery.cssHooks.xml b/entries/jQuery.cssHooks.xml index 8252bfa5..f7ecb170 100644 --- a/entries/jQuery.cssHooks.xml +++ b/entries/jQuery.cssHooks.xml @@ -163,7 +163,7 @@ if ( $.support.someCSSProp && $.support.someCSSProp !== "someCSSProp" ) })( jQuery );

Special units

-

By default, jQuery adds a "px" unit to the values passed to the .css() method. This behavior can be prevented by adding the property to the jQuery.cssNumber object

+

By default, jQuery adds a "px" unit to the values passed to the .css() method. This behavior can be prevented by adding the property to the jQuery.cssNumber object


 $.cssNumber.someCSSProp = true;
     
diff --git a/entries/jQuery.cssNumber.xml b/entries/jQuery.cssNumber.xml new file mode 100644 index 00000000..ce5af886 --- /dev/null +++ b/entries/jQuery.cssNumber.xml @@ -0,0 +1,33 @@ + + + jQuery.cssNumber + + 1.4.3 + + An object containing all CSS properties that may be used without a unit. The .css() method uses this object to see if it may append px to unitless values. + +

You can think about jQuery.cssNumber as a list of all CSS properties you might use without a unit. It's used by .css() to determine if it needs to add px to unitless values.

+

The keys of the jQuery.cssNumber object are camel-cased and the values are all set to true. If you want to prevent the .css() method from automatically adding the px unit for a specific CSS property, you can add an extra property to the jQuery.cssNumber object.

+

+jQuery.cssNumber.someCSSProp = true;
+    
+

By default the object contains the following properties:

+
    +
  • zIndex
  • +
  • fontWeight
  • +
  • opacity
  • +
  • zoom
  • +
  • lineHeight
  • +
  • widows (added in jQuery 1.6)
  • +
  • orphans (added in jQuery 1.6)
  • +
  • fillOpacity (added in jQuery 1.6.2)
  • +
  • columnCount (added in jQuery 1.9)
  • +
  • order (added in jQuery 1.10.2)
  • +
  • flexGrow (added in jQuery 1.11.1)
  • +
  • flexShrink (added in jQuery 1.11.1)
  • +
+
+ + + +