aboutsummaryrefslogtreecommitdiffstats
path: root/src/css
Commit message (Collapse)AuthorAgeFilesLines
* CSS: Return `undefined` for whitespace-only CSS variable values (#5120)Michał Gołębiowski-Owczarek2022-10-031-4/+24
| | | | | | | | | | | | | | | | The spec requires that CSS variable values are trimmed. In browsers that do this - mainly, Safari, but also Firefox if the value only has leading whitespace - we currently return undefined; in other browsers, we return an empty string as the logic to fall back to undefined happens before trimming. This commit adds another explicit callback to `undefined` to have it consistent across browsers. Also, more explicit comments about behaviors we need to work around in various browsers have been added. Closes gh-5120 Ref gh-5106
* CSS: Don’t trim whitespace of undefined custom propertyAnders Kaseorg2022-09-191-1/+1
| | | | | | Fixes gh-5105 Closes gh-5106 Signed-off-by: Anders Kaseorg <andersk@mit.edu>
* Docs: Replace `#NUMBER` Trac issue references with `trac-NUMBER`Michał Gołębiowski-Owczarek2022-01-041-1/+1
| | | | | | | | | | | | | 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: Justify use of rtrim on CSS property valuesRichard Gibson2022-01-031-0/+6
| | | | | | | CSS does not acknowledge carriage return or form feed characters as whitespace but it does replace them with whitespace, making it acceptable to use `rtrim`. Closes gh-4956
* CSS: Trim whitespace surrounding CSS Custom Properties valuesfecore12021-09-232-1/+10
| | | | | | | | 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
* Support: ensure display is set to block for the support divTimmy Willison2021-02-171-0/+9
| | | | | | | | | | * Support: ensure display is set to block for the support div - Fixes an issue with the support test in iframes in Android 8 Chrome 86+, where display: inline resulted in unexpected height values. Close gh-4845 Fixes gh-4832
* Dimensions: Add offset prop fallback to FF for unreliable TR dimensionsTimmy Willison2021-01-111-0/+52
| | | | | | | | 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-222-35/+1
| | | | | | | | | | | | 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: Update eslint-config-jquery, fix linting violationsMichał Gołębiowski-Owczarek2020-05-184-4/+4
| | | | | Closes gh-4696 Ref jquery/eslint-config-jquery#15 Ref jquery/eslint-config-jquery#16
* Build: Enable ESLint one-var rule for var declarations in browser codeMichał Gołębiowski-Owczarek2020-03-021-2/+2
| | | | | | | Node.js code is written more & more commonly in ES6+ so it doesn't make sense to enable it there. There are many violations in test code so it's disabled there as well. Closes gh-4615
* Core: Migrate from AMD to ES modules 🎉Michał Gołębiowski-Owczarek2019-11-1813-124/+56
| | | | | | | | | | | | | | | | | | | | | | 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-0/+40
| | | | 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-60/+0
| | | | | | | Also, update some tests to IE-sniff when deciding whether to skip a test. Fixes gh-4386 Closes gh-4387
* Build: Fix AMD dependencies in curCSSMichał Gołębiowski-Owczarek2019-04-302-8/+1
| | | | | | | | | A leftover `rboxStyle` was left in the wrapper parameters but not in the dependency array, causing `getStyles` to be undefined in AMD mode. Since `rboxStyle` is no longer used, it's now removed. Ref gh-4347 Closes gh-4380
* Core: Drop support for IE <11, iOS <11, Firefox <65, Android Browser & PhantomJSMichał Gołębiowski-Owczarek2019-04-296-149/+40
| | | | | | | | | | | 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-5/+4
| | | | Fixes gh-4056 Closes gh-4364
* Data: Separate data & css/effects camelCase implementationsMichał Gołębiowski-Owczarek2019-04-291-0/+20
| | | | | | | | 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
* Build: Fix unresolved jQuery reference in finalPropNameMichał Gołębiowski-Owczarek2019-04-171-1/+4
| | | | | | | Also, prevent further similar breakages by changing our ESLint configuration to disallow relying on a global jQuery object in AMD modules. Fixes gh-4358 Closes gh-4361
* CSS: Don't automatically add "px" to properties with a few exceptionsMichał Gołębiowski-Owczarek2019-04-082-3/+45
| | | | | | Fixes gh-2795 Closes gh-4055 Ref gh-4009
* Core: Recognize Shadow DOM in attachment checksSaptak Sengupta2018-11-092-2/+2
| | | | | | | Allow `isAttached` to check Shadow DOM for attachment. Fixes gh-3504 Closes gh-3996 Ref gh-3977
* CSS: Don't read styles.position in the width/height cssHook unless necessaryMichał Gołębiowski-Owczarek2018-10-081-1/+1
| | | | | | | | | | | | 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: Correctly detect scrollbox support with non-default zoomRichard Gibson2018-05-071-1/+3
| | | | Fixes gh-4029 Closes gh-4030
* CSS: Skip the px-appending logic for animations of non-element propsMichał Gołębiowski-Owczarek2018-04-301-1/+2
| | | | | | | Without this change animating properties from jQuery.cssNumber on non-elements throws an error. Ref gh-4055 Closes gh-4061
* CSS: Avoid filling jQuery.cssPropsDave Methvin2018-03-191-0/+39
| | | | | | | | 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: Use isAttached to check for attachment of elementSaptak Sengupta2018-03-052-7/+7
| | | | | | | This change replaces the use of contains to check for attachment by isAttached function Closes gh-3977 Ref gh-3504
* CSS: Correctly set support properties with non-default zoomSaptak Sengupta2017-12-051-3/+7
| | | | Fixes gh-3808 Closes gh-3872
* CSS: Detect more WebKit styles erroneously reported as percentagesRichard Gibson2017-09-184-16/+18
| | | | | Ref 692f9d4db30c9c6c4f6bc76005cf153586202fa6 Fixes gh-3777 Closes gh-3778
* CSS: Avoid unit-conversion interference from CSS upper boundsRichard Gibson2017-08-281-17/+19
| | | | Fixes gh-2144 Closes gh-3745
* Support: Properly check for IE9 absolute scrollbox mishandlingRichard Gibson2017-07-181-22/+22
| | | | | | Ref gh-3589 Fixes gh-3699 Fixes gh-3730 Closes gh-3729
* Dimensions: Detect and account for content-box dimension mishandlingRichard Gibson2017-07-101-6/+15
| | | | Fixes gh-3699 Closes gh-3700
* CSS: retrieve inline style before computedTimmy Willison2017-03-201-2/+7
| | | | - Fixes an issue with getting computed style on detached elements
* Dimensions: fall back to offsetWidth/Height for inline elemsTimmy Willison2017-03-201-2/+2
| | | | | Close gh-3577 Fixes gh-3571
* CSS: Support custom propertiesConnor Atherton2017-03-071-2/+3
| | | | | | Fixes gh-3144 Closes gh-3199 Closes gh-3557
* Build: More ESLint related changesOleg Gaidarenko2016-07-091-1/+1
|
* Build: ESLint detailsOleg Gaidarenko2016-06-111-2/+6
| | | | | | Use eslint pragmas, fix new errors, etc Closes gh-3148
* Build: Put all AMD modules in "src/" in strict modeMichał Gołębiowski2016-04-2512-0/+23
| | | | Fixes gh-3073
* Build: A more modest block-level function proposalRichard Gibson2016-04-231-18/+19
| | | | This reverts commit fa610da68440530e73bba296a1f982f94dfeac99.
* CSS: Toggle detached elements as visible unless they have display: noneRichard Gibson2016-04-112-10/+20
| | | | | Fixes gh-2863 Closes gh-3037
* Docs: Update support comments to follow the new syntaxMichał Gołębiowski2016-03-303-5/+5
| | | | | The changes follow the spec proposed in: https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-69379197
* Support: improve support properties computationOleg Gaidarenko2016-03-281-19/+15
| | | | | | | | | * Remove div from the memory if it is not needed anymore * Make `computeStyleTests` method a singleton Fixes gh-3018 Closes gh-3021
* Docs:Tests: Remove obsolete code from tests, update support commentsMichał Gołębiowski2016-03-084-7/+7
| | | | | | | | | | Support comments that were lacking the final IE/Edge version that exhibits the bug were checked & updated. Links to the Chromium bug tracker were updated. Code in tests related to unsupported browsers (like Android 2.3 in non-basic tests) has been removed. Fixes gh-2868 Closes gh-2949
* Selector: filters -> pseudosTimmy Willison2016-03-071-3/+3
| | | | | Fixes gh-2073 Close gh-2969
* CSS: Make sure elem.ownerDocument.defaultView is not nullTodor Prikumov2016-01-271-1/+1
| | | | | Fixes gh-2866 Close gh-2867
* Docs: use https where possibleBernhard M. Wiedemann2016-01-271-1/+1
| | | | Close gh-2875
* CSS: isHidden -> isHiddenWithinTreeTimmy Willison2016-01-212-4/+6
| | | | | Fixes gh-2404 Close gh-2855
* CSS: Stop Firefox from treating disconnected elements as cascade-hiddenRichard Gibson2016-01-141-1/+6
| | | | | | Fixes gh-2833 Ref dba93f79c405373ec3a492fd0a4bf89b3136a6e6 Close gh-2835
* CSS: Restore cascade-override behavior in .showRichard Gibson2016-01-131-6/+38
| | | | | | | Fixes gh-2654 Fixes gh-2308 Close gh-2810 Ref 86419b10bfa5e3b71a7d416288ab806d47a31d1f
* Effects: fix loading showHide in AMD modeTimmy Willison2015-11-101-0/+1
|
* CSS: Correct misrepresentation of "auto" horizontal margins as 0Richard Gibson2015-10-181-6/+18
| | | | | | | | | | | | Fixes gh-2237 Closes gh-2276 (cherry picked from commit 214e1634ab9b1d13d53647dd5de3bdf7a091d49c) Conflicts: src/css.js src/css/support.js test/unit/support.js