diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2020-01-21 14:11:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-21 14:11:06 +0100 |
commit | 865469f5e60f55feb28469bb0a7526dd22f04b4e (patch) | |
tree | 39ed63ecdde95aa7d81c57ab3ceec37356692ef6 | |
parent | 89a18de64cec73936507ea9feca24d029edea24f (diff) | |
download | jquery-865469f5e60f55feb28469bb0a7526dd22f04b4e.tar.gz jquery-865469f5e60f55feb28469bb0a7526dd22f04b4e.zip |
CSS: Remove the opacity CSS hook
The consequence is `.css( "opacity" )` will now return an empty string for
detached elements in standard-compliant browsers and "1" in IE & the legacy
Edge. That behavior is shared by most other CSS properties which we're not
normalizing either.
Closes gh-4593
-rw-r--r-- | src/css.js | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/css.js b/src/css.js index 6d67ffaa7..2bffa9610 100644 --- a/src/css.js +++ b/src/css.js @@ -185,18 +185,7 @@ jQuery.extend( { // Add in style property hooks for overriding the default // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, + cssHooks: {}, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { |