diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2019-04-29 22:56:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-29 22:56:09 +0200 |
commit | cf84696fd1d7fe314a11492606529b5a658ee9e3 (patch) | |
tree | 8fd4a45dd755e5f1215adbc82e7870727c8164e8 /src/css/curCSS.js | |
parent | bde53edcf4bd6c975d068eed4eb16c5ba09c1cff (diff) | |
download | jquery-cf84696fd1d7fe314a11492606529b5a658ee9e3.tar.gz jquery-cf84696fd1d7fe314a11492606529b5a658ee9e3.zip |
Core: Drop support for IE <11, iOS <11, Firefox <65, Android Browser & PhantomJS
Also, update support comments format to match format described in:
https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-69379197
with the change from:
https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-448998379
(open-ended ranges end with `+`).
Fixes gh-3950
Fixes gh-4299
Closes gh-4347
Diffstat (limited to 'src/css/curCSS.js')
-rw-r--r-- | src/css/curCSS.js | 43 |
1 files changed, 5 insertions, 38 deletions
diff --git a/src/css/curCSS.js b/src/css/curCSS.js index 98a594a77..111285b2e 100644 --- a/src/css/curCSS.js +++ b/src/css/curCSS.js @@ -1,61 +1,28 @@ define( [ "../core", "../core/isAttached", - "./var/rboxStyle", - "./var/rnumnonpx", - "./var/getStyles", - "./support" -], function( jQuery, isAttached, rboxStyle, rnumnonpx, getStyles, support ) { + "./var/getStyles" +], function( jQuery, isAttached, rboxStyle, getStyles ) { "use strict"; function curCSS( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - - // Support: Firefox 51+ - // Retrieving style before computed somehow - // fixes an issue with getting wrong values - // on detached elements - style = elem.style; + var ret; computed = computed || getStyles( elem ); - // getPropertyValue is needed for: - // .css('filter') (IE 9 only, #12537) - // .css('--customProperty) (#3144) + // getPropertyValue is needed for `.css('--customProperty')` (gh-3144) if ( computed ) { ret = computed.getPropertyValue( name ) || computed[ name ]; if ( ret === "" && !isAttached( elem ) ) { ret = jQuery.style( elem, name ); } - - // A tribute to the "awesome hack by Dean Edwards" - // Android Browser returns percentage for some values, - // but width seems to be reliably pixels. - // This is against the CSSOM draft spec: - // https://drafts.csswg.org/cssom/#resolved-values - if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } } return ret !== undefined ? - // Support: IE <=9 - 11 only + // Support: IE <=9 - 11+ // IE returns zIndex value as an integer. ret + "" : ret; |