mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
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
This commit is contained in:
parent
89a18de64c
commit
865469f5e6
13
src/css.js
13
src/css.js
@ -185,18 +185,7 @@ jQuery.extend( {
|
|||||||
|
|
||||||
// Add in style property hooks for overriding the default
|
// Add in style property hooks for overriding the default
|
||||||
// behavior of getting and setting a style property
|
// behavior of getting and setting a style property
|
||||||
cssHooks: {
|
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Get and set the style property on a DOM Node
|
// Get and set the style property on a DOM Node
|
||||||
style: function( elem, name, value, extra ) {
|
style: function( elem, name, value, extra ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user