aboutsummaryrefslogtreecommitdiffstats
path: root/src/css.js
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Docs: Replace `#NUMBER` Trac issue references with `trac-NUMBER`Michał Gołębiowski-Owczarek2022-01-041-4/+4
| | | | | | | | | | | | | 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-4993
* CSS: Trim whitespace surrounding CSS Custom Properties valuesfecore12021-09-231-1/+1
| | | | | | | | 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
* Dimensions: Add offset prop fallback to FF for unreliable TR dimensionsTimmy Willison2021-01-111-14/+16
| | | | | | | | Firefox incorrectly (or perhaps correctly) includes table borders in computed dimensions, but they are the only one. Workaround this by testing for it and falling back to offset properties Fixes gh-4529 Closes gh-4808
* Core: Drop support for Edge Legacy (i.e. non-Chromium Microsoft Edge)Michał Gołębiowski-Owczarek2020-09-221-9/+12
| | | | | | | | | | | | Drop support for Edge Legacy: the non-Chromium, EdgeHTML-based Microsoft Edge version. Also, restrict some workarounds that were applied unconditionally in all browsers to run only in IE now. This slightly increases the size but reduces the performance burden on modern browsers that don't need the workarounds. Also, clean up some comments & remove some obsolete workarounds. Fixes gh-4568 Closes gh-4792
* Build: Correct code indentations based on jQuery Style GuideWonseop Kim2020-05-051-4/+4
| | | | | | | | 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
* CSS: Remove the opacity CSS hookMichał Gołębiowski-Owczarek2020-01-211-12/+1
| | | | | | | | 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
* Core: Migrate from AMD to ES modules 🎉Michał Gołębiowski-Owczarek2019-11-181-26/+20
| | | | | | | | | | | | | | | | | | | | | | Migrate all source AMD modules to ECMAScript modules. The final bundle is compiled by a custom build process that uses Rollup under the hood. Test files themselves are still loaded via RequireJS as that has to work in IE 11. Tests can now be run in "Load as modules" mode which replaces the previous "Load with AMD" option. That option of running tests doesn't work in IE and Edge as it requires support for dynamic imports. Some of the changes required by the migration: * check `typeof` of `noGlobal` instead of using the variable directly as it's not available when modules are used * change the nonce module to be an object as ECMASscript module exports are immutable * remove some unused exports * import `./core/parseHTML.js` directly in `jquery.js` so that it's not being cut out when the `ajax` module is excluded in a custom compilation Closes gh-4541
* CSS: Workaround buggy getComputedStyle on table rows in IE/EdgeMichał Gołębiowski-Owczarek2019-10-141-9/+18
| | | | Fixes gh-4490 Closes gh-4506
* Build: ESLint: forbid unused function parametersMichał Gołębiowski-Owczarek2019-05-131-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
* Core: Remove IE-specific support tests, rely on document.documentModeMichał Gołębiowski-Owczarek2019-05-131-7/+9
| | | | | | | Also, update some tests to IE-sniff when deciding whether to skip a test. Fixes gh-4386 Closes gh-4387
* Core: Drop support for IE <11, iOS <11, Firefox <65, Android Browser & PhantomJSMichał Gołębiowski-Owczarek2019-04-291-43/+7
| | | | | | | | | | | 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
* Core: Remove deprecated jQuery APIsMichał Gołębiowski-Owczarek2019-04-291-4/+0
| | | | Fixes gh-4056 Closes gh-4364
* Data: Separate data & css/effects camelCase implementationsMichał Gołębiowski-Owczarek2019-04-291-4/+4
| | | | | | | | The camelCase implementation used by the data module no longer turns `-ms-foo` into `msFoo` but to `MsFoo` now. This is because `data` is supposed to be a generic utility not specifically bound to CSS use cases. Fixes gh-3355 Closes gh-4365
* CSS: Don't automatically add "px" to properties with a few exceptionsMichał Gołębiowski-Owczarek2019-04-081-30/+5
| | | | | | Fixes gh-2795 Closes gh-4055 Ref gh-4009
* 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