Skip to content

Commit ba68919

Browse files
committed
jQuery.cssNumber: Add a deprecation note
1 parent 07245fc commit ba68919

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

entries/jQuery.cssNumber.xml

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
</signature>
77
<desc>An object containing all CSS properties that may be used without a unit. Prior to jQuery 4.0, the <a href="/css/"><code>.css()</code></a> method uses this object to see if it may append <code>px</code> to unitless values.</desc>
88
<longdesc>
9+
<div class="warning">
10+
<p>Note: This API has been removed in jQuery 4.0; please pass a string value with the desired units instead.</p>
11+
</div>
912
<p>You can think about <code>jQuery.cssNumber</code> as a list of all CSS properties you might use without a unit. Prior to jQuery 4.0, it was used by <a href="/css/"><code>.css()</code></a> to determine if it needs to add <code>px</code> to unitless values.</p>
1013
<p>The keys of the <code>jQuery.cssNumber</code> object are camel-cased and the values are all set to <code>true</code>. If you want to prevent the <a href="/css/"><code>.css()</code></a> method from automatically adding the <code>px</code> unit for a specific CSS property and that property is not yet a key of the <code>jQuery.cssNumber</code> object, you can add such an extra property:</p>
1114
<pre><code>

0 commit comments

Comments
 (0)