aboutsummaryrefslogtreecommitdiffstats
path: root/src/css.js
Commit message (Collapse)AuthorAgeFilesLines
* CSS: Fix reliableTrDimensions test for initially hidden iframes (3.x)Michał Gołębiowski-Owczarek2023-11-071-0/+3
| | | | | | | | Also, account for the fact old Firefox (<61) has `null` computed style for elements in such iframes. Closes gh-5359 Ref gh-5317 Ref gh-5358
* CSS: Make `offsetHeight( true )`, etc. include negative marginsMichał Gołębiowski-Owczarek2023-04-041-3/+6
| | | | | | | | | | | | | | | This regressed in gh-3656 as the added logic to include scroll gutters in `.innerWidth()` / `.innerHeight()` didn't take negative margins into account. This broke handling of negative margins in `.offsetHeight( true )` and `.offsetWidth( true )`. To fix it, calculate margin delta separately and only add it after the scroll gutter adjustment logic. Fixes gh-3982 Closes gh-5234 Ref gh-3656 (cherry picked from commit bce13b72c1753e16cc0db53ebf0f0456bdcf6b48)
* CSS: Add missing jQuery.cssNumber entriesMichał Gołębiowski-Owczarek2023-03-271-20/+29
| | | | | | | | | | | New entries cover `aspect-ratio`, `scale`, and a few others. Also, remove quotes around `cssNumber` keys A few properties have been taken from React: https://github.com/facebook/react/blob/afea1d0c536e0336735b0ea5c74f635527b65785/packages/react-dom-bindings/src/shared/CSSProperty.js\#L8-L58 Fixes gh-5179 Closes gh-5233
* Docs: Replace `#NUMBER` Trac issue references with `trac-NUMBER`Michał Gołębiowski-Owczarek2022-01-121-3/+3
| | | | | | | | | | | | | | | | | This is a version of gh-4993 for the `3.x-stable` branch. The GitHub UI treats `#NUMBER` as referring to its own issues which is confusing when in jQuery source it's usually referring to the old deprecated Trac instance at https://bugs.jquery.com. This change replaces all such Trac references with `trac-NUMBER`. A few of the references came with the Sizzle integration and referred to the Sizzle GitHub bug tracker. Those have been replaced with full links instead. A new entry describing issue reference conventions has been added to README. Closes gh-4994 Ref gh-4993 Ref 5d5ea015114092c157311c4948f7cc3d8c8e7f8a
* CSS: Trim whitespace surrounding CSS Custom Properties valuesfecore12021-10-181-3/+4
| | | | | | | | | | | The spec has recently changed and CSS Custom Properties values are trimmed now. This change makes jQuery polyfill that new behavior for all browsers. Ref w3c/csswg-drafts#774 Fixes gh-4926 Closes gh-4930 (partially cherry picked from commit efadfe991a5c287af561a9326bf1427d726c91c1)
* Build: Correct code indentations based on jQuery Style GuideWonseop Kim2020-05-051-5/+5
| | | | | | | | | | | 1. Correct code indentations based on jQuery Style Guide (contribute.jquery.org/style-guide/js/#spacing). 2. Add rules to "src/.eslintrc.json" to enable "enforcing consistent indentation", with minimal changes to the current code. Closes gh-4672 (cherry picked from 3d62d5704989f17d3a20ae7521d52e9c8c60b4ee)
* CSS: Workaround buggy getComputedStyle on table rows in IE/EdgeMichał Gołębiowski-Owczarek2019-10-141-9/+19
| | | | Fixes gh-4490 Closes gh-4503
* Build: ESLint: forbid unused function parametersMichał Gołębiowski-Owczarek2019-09-261-2/+2
| | | | | | | | | | | | | | | | This commit requires all function parameters to be used, not just the last one. In cases where that's not possible as we need to match an external API, there's an escape hatch of prefixing an unused argument with `_`. This change makes it easier to catch unused AMD dependencies and unused parameters in internal functions the API of which we may change at will, among other things. Unused AMD dependencies have been removed as part of this commit. Closes gh-4381 (cherry-picked from 438b1a3e8a52d3e4efd8aba45498477038849c97)
* CSS: Avoid forcing a reflow in width/height getters unless necessaryMichał Gołębiowski-Owczarek2019-03-181-3/+12
| | | | | | | | Fixes gh-4322 Closes gh-4325 Ref gh-3991 Ref gh-4010 Ref gh-4185 Ref gh-4187
* Dimensions: fall back to offsetWidth/Height for border-box in IETimmy Willison2018-11-271-15/+18
| | | | | | | | - Use getClientRects() to explicitly detect hidden/disconnected elements Close gh-4223 Fixes gh-4102
* CSS: Don't read styles.position in the width/height cssHook unless necessaryMichał Gołębiowski-Owczarek2018-10-081-3/+7
| | | | | | | | | | | | Current width/height cssHook reads the computed position style even if not necessary as the browser passes the scrollboxSize support test. That has been changed. This commit also makes the scrollboxSize support test in line with all others (i.e. only return true or false) and changes the variable name in the hook to make the code clearer. Fixes gh-4185 Closes gh-4187
* CSS: Don't auto-append "px" to possibly-unitless CSS grid propertiesBert Zhang2018-08-291-0/+7
| | | | | | This commit adds some CSS grid-related properties to jQuery.cssNumber. Fixes gh-4007
* Dimensions: fix computing outerWidth on SVGsJason Bedard2018-06-201-1/+4
| | | | Fixes gh-3964 Closes gh-4096
* CSS: Don't auto-append "px" to CSS variables (#4064)Michał Gołębiowski-Owczarek2018-06-041-1/+3
| | | | Fixes gh-4063 Closes gh-4064
* CSS: Correctly detect scrollbox support with non-default zoomRichard Gibson2018-05-071-7/+9
| | | | Fixes gh-4029 Closes gh-4030
* Dimensions: avoid fetching boxSizing when setting width/heightJason Bedard2018-03-251-2/+7
| | | | | | - this avoids forcing a reflow in some cases Fixes #3991
* CSS: Avoid filling jQuery.cssPropsDave Methvin2018-03-191-35/+3
| | | | | | | | Fixes gh-3986 Closes gh-4005 Avoids filling jQuery.cssProps by introducing a second internal prop cache. This allows jQuery Migrate to detect external usage.
* Core: make camelCase function available only for internal usageNilton Cesar2018-01-081-3/+4
| | | | | Close gh-3604 Fixes gh-3384
* CSS: Detect more WebKit styles erroneously reported as percentagesRichard Gibson2017-09-181-3/+2
| | | | | Ref 692f9d4db30c9c6c4f6bc76005cf153586202fa6 Fixes gh-3777 Closes gh-3778
* Dimensions: Don't trust non-pixel computed width/heightRichard Gibson2017-08-071-2/+6
| | | | Fixes gh-3611 Closes gh-3741
* Dimensions: Improve offsetWidth/offsetHeight fallbackRichard Gibson2017-07-311-2/+9
| | | | | Fixes gh-3698 Fixes gh-3602 Closes gh-3738
* Support: Properly check for IE9 absolute scrollbox mishandlingRichard Gibson2017-07-181-1/+1
| | | | | | Ref gh-3589 Fixes gh-3699 Fixes gh-3730 Closes gh-3729
* Dimensions: Detect and account for content-box dimension mishandlingRichard Gibson2017-07-101-5/+17
| | | | Fixes gh-3699 Closes gh-3700
* Dimensions: Include scroll gutter in "padding" boxRichard Gibson2017-06-191-46/+68
| | | | Fixes gh-3589 Closes gh-3656
* CSS: Drop the float mapping from cssPropsMichał Gołębiowski2017-05-061-3/+1
| | | | | Firefox 35 and newer support style.float directly. Closes #3569
* Dimensions: fall back to offsetWidth/Height for inline elemsTimmy Willison2017-03-201-0/+6
| | | | | Close gh-3577 Fixes gh-3571
* CSS: remove dead code in getWidthOrHeightTimmy Willison2017-03-131-5/+0
| | | | | | - getCSS already falls back to inline styles Ref gh-3561
* Dimensions: ignore transforms when retrieving width/heightTimmy Willison2017-03-131-30/+16
| | | | | Close gh-3561 Fixes gh-3193
* CSS: Support custom propertiesConnor Atherton2017-03-071-7/+32
| | | | | | Fixes gh-3144 Closes gh-3199 Closes gh-3557
* Core: Deprecate jQuery.isArrayManoj Kumar2016-11-301-1/+1
| | | | | Fixes gh-2961 Closes gh-3278
* Build: Update eslint config and fix associated errorsOleg Gaidarenko2016-07-151-7/+9
|
* CSS: Don't workaround the IE 11 iframe-in-fullscreen sizing issuesMichał Gołębiowski2016-04-261-7/+0
| | | | | | | | | | | | | | | | | IE 11 used to have an issue where if an element inside an iframe was put in fullscreen mode, the element dimensions started being 100 times too small; we've added a workaround that would multiply them by 100. However, the IE 11 issue has been unexpectedly fixed and since our detection was really detecting the browser and not a bug, we've started breaking the browser instead of fixing it. Since there's no good way to detect if the bug exists, we have to back the workaround out completely. Fixes gh-3041 Refs gh-1764 Refs gh-2401 Refs 90d828bad0d6d318d73d6cf6209d9dc7ac13878c
* Build: Put all AMD modules in "src/" in strict modeMichał Gołębiowski2016-04-251-0/+2
| | | | Fixes gh-3073
* Docs: Update support comments to follow the new syntaxMichał Gołębiowski2016-03-301-4/+3
| | | | | The changes follow the spec proposed in: https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-69379197
* CSS: isHidden -> isHiddenWithinTreeTimmy Willison2016-01-211-2/+1
| | | | | Fixes gh-2404 Close gh-2855
* CSS: Add animation-iteration-count to cssNumber, fix testsJun Sun2016-01-071-0/+1
| | | | | Fixes gh-2792 Closes gh-2793
* Dimensions: properly manipulate non-px valuesTimmy Willison2015-11-091-9/+19
| | | | | Fixes gh-1712 Close gh-2695
* CSS: Correct misrepresentation of "auto" horizontal margins as 0Richard Gibson2015-10-181-0/+13
| | | | | | | | | | | | Fixes gh-2237 Closes gh-2276 (cherry picked from commit 214e1634ab9b1d13d53647dd5de3bdf7a091d49c) Conflicts: src/css.js src/css/support.js test/unit/support.js
* CSS: use isFinite in place of redundant isNumericTimmy Willison2015-10-181-1/+1
|
* CSS: Make show/hide/toggle methods a moduleDave Methvin2015-10-181-21/+1
| | | | | | | | Unit test changes some uses of .show() and .hide() to .css( "display", ... ), there was already an implicit assumption in several of the existing tests. Fixes gh-2193 Close gh-2648
* Ajax:Attributes:CSS:Manipulation: Reduce Android 2.3 supportMichał Gołębiowski2015-09-141-10/+0
| | | | | | | | Drop non-critical workarounds for Android 2.3. Fixes gh-2483 Fixes gh-2505 Closes gh-2581
* Build: Update jscs and lint filesOleg Gaidarenko2015-09-071-20/+31
| | | | Fixes gh-2056
* CSS: Make .css("width") & .css("height") return fractional valuesMichał Gołębiowski2015-07-071-9/+17
| | | | | Fixes gh-1724 Closes gh-2439
* CSS: Improve a comment explaining IE11 fullscreen bugMichał Gołębiowski2015-07-011-1/+2
|
* CSS: Work around an IE11 fullscreen dimensions bugMartin Naumann2015-06-231-0/+11
| | | | | Fixes gh-1764 Closes gh-2401
* CSS: Don't cache unrecognized CSS property namesMichał Gołębiowski2015-06-011-11/+10
| | | | | | | | | | | | | | | | | This prevents jQuery from caching a prefixed property name if provided directly by the user, e.g. the following code: elem.css( "msTransform", "translate(5px, 2px)" ); should not prevent one from from later setting the transition directly: elem.css( "transform", "translate(5px, 2px)" ); on a browser not understanding the unprefixed version which is the case for Safari 8 & transform. Fixes gh-2015 Closes gh-2298
* CSS: Ignore the CSS cascade in show()/hide()/etc.Richard Gibson2015-05-111-62/+2
| | | | | | Fixes gh-1767 Fixes gh-2071 Closes gh-2180
* CSS: Don't expose jQuery.swapMichał Gołębiowski2015-04-131-4/+4
| | | | | | | | | jQuery.swap was an undocumented API used only internally. With the modular AMD system we currently have it's not necessary to expose this function publicly under the jQuery object. Fixes gh-2058 Closes gh-2182
* CSS: Support relative adjustment in any applicable unitMr212015-03-091-8/+9
| | | | | Fixes gh-1711 Closes gh-2011
* Misc: Drop support for older browsers; update support commentsMichał Gołębiowski2014-11-031-1/+1
| | | | | | | | That includes Opera 12.x, Firefox<29, Safari<6.0 and some hacks for old Blackberry. Closes gh-1820 Refs gh-1815