diff options
author | Michał Gołębiowski <m.goleb@gmail.com> | 2013-04-04 22:04:39 +0200 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2013-04-06 17:09:52 -0400 |
commit | dca7681284731053124e6437c5bec58e030cc91d (patch) | |
tree | 6646d538c7866f9336f2ac11a6e181b616a5632f /src/css.js | |
parent | 1b610266502490eab42a0b9ddfac2f93da0b0fe1 (diff) | |
download | jquery-dca7681284731053124e6437c5bec58e030cc91d.tar.gz jquery-dca7681284731053124e6437c5bec58e030cc91d.zip |
Improve CSS and `Support:` comments. Close gh-1220.
1) corrected box-sizing rules order - the unprefixed value should always be the last one
2) removed last semi-colons in CSS rules
3) updated support comments
code review changes + more consistent comment spacing
Diffstat (limited to 'src/css.js')
-rw-r--r-- | src/css.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/css.js b/src/css.js index 522982b3f..bbd56ad7b 100644 --- a/src/css.js +++ b/src/css.js @@ -295,9 +295,8 @@ curCSS = function( elem, name, _computed ) { ret = jQuery.style( elem, name ); } - // Support: Chrome <17, Safari 5.1 + // Support: Safari 5.1 // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { @@ -484,10 +483,12 @@ jQuery.each([ "height", "width" ], function( i, name ) { // These hooks cannot be added until DOM ready because the support test // for it is not run until after DOM ready jQuery(function() { + // Support: Android 2.3 if ( !jQuery.support.reliableMarginRight ) { jQuery.cssHooks.marginRight = { get: function( elem, computed ) { if ( computed ) { + // Support: Android 2.3 // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right // Work around by temporarily setting element display to inline-block return jQuery.swap( elem, { "display": "inline-block" }, |