summaryrefslogtreecommitdiffstats
path: root/test/unit/css.js
Commit message (Collapse)AuthorAgeFilesLines
* Build: improve specificity of eslint config; add ecma versionsTimmy Willison2024-06-061-5/+2
| | | Closes gh-5501
* CSS:Tests: Fix tests & support tests under CSS ZoomMichał Gołębiowski-Owczarek2024-06-031-2/+6
| | | | | | | | | | | | Firefox 126+ implements CSS zoom in a way it affects width computed style very slightly (`100.008px` instead of `100px`); accept that difference. Add a test for support tests resolving the same under CSS zoom & without one. That test uncovered Chrome failing the `reliableTrDimensions` support test under zoom; the test has been fixed. Fixes gh-5489 Closes gh-5495 Ref gh-5496
* Tests: Use allowlist instead of whitelistJ.Son2024-03-011-5/+5
| | | Closes gh-5420
* CSS: Fix reliableTrDimensions support test for initially hidden iframesMichał Gołębiowski-Owczarek2023-11-071-0/+41
| | | | | Closes gh-5358 Ref gh-5317 Ref gh-5359
* Core: Simplify code post browser support reductionMichał Gołębiowski-Owczarek2023-09-201-1/+1
| | | | | | | | | | | | | | | | | Summary of the changes: * Core: Simplify code post browser support reduction * Tests: Remove legacy jQuery.cache & oldIE leftovers * Tests: Reformat JavaScript in delegatetest.html * Docs: "jQuery Foundation Projects" -> "jQuery Projects" * Tests: Drop an unused localfile.html file (modern browsers don't support the `file:` protocol this way, there's no point in keeping the file around) * Effects: Remove a redundant `!fn` check (`fn || !fn && easing` is equivalent to `fn || easing`; simplify the code) * CSS: Explain the fallback to direct object access in curCSS better * Tests: Deduplicate `jQuery.parseHTML` test titles * Dimensions: Add a test for fractional values * Tests: Fix a buggy WebKit regex Closes gh-5296
* Build: migrate most grunt tasks off of gruntTimmy Willison2023-09-181-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Updated tasks include: - lint - npmcopy - build, minify, and process for distribution. - new custom build command using yargs - compare size of minified/gzip built files - pretest scripts, including qunit-fixture, babel transpilation, and npmcopy - node smoke tests - promises aplus tests - new watch task using `rollup.watch` directly Also: - upgraded husky and added the new lint command - updated lint config to use new "flat" config format. See https://eslint.org/docs/latest/use/configure/configuration-files-new - Temporarily disabled one lint rule until flat config is supported by eslint-plugin-import. See https://github.com/import-js/eslint-plugin-import/issues/2556 - committed package-lock.json - updated all test scripts to use the new build - added an express test server that uses middleware-mockserver (this can be used to run tests without karma) - build-all-variants is now build:all Close gh-5318
* Docs: Fix typos found by codespellDimitri Papadopoulos Orfanos2023-06-281-3/+3
| | | Closes gh-5165
* Build: Run GitHub Action browser tests on Playwright WebKitMichał Gołębiowski-Owczarek2023-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | So far, we've been running browser tests on GitHub Actions in Chrome and Firefox. Regular Safari is not available in GitHub Actions but Playwright WebKit comes close to a dev version of Safari. With this change, our GitHub CI & local test runs will invoke tests on all actively developed browser engines on all PRs. Also, our GitHub Actions browser tests are now running on Node.js 18. Detection of the Playwright WebKit browser in support unit tests is done by checking if the `test_browser` query parameter is set to `"Playwright"`; this is a `karma-webkit-launcher` feature. Detecting that browser via user agent as we normally do is hard as the UA on Linux is very similar to a real Safari one but it actually uses a newer version of the engine. In addition, we now allow to pass custom browsers when one needs it; e.g., to run the tests in all three engines on Linux/macOS, run: ``` grunt && BROWSERS=ChromeHeadless,FirefoxHeadless,WebkitHeadless grunt karma:main ``` Closes gh-5190
* CSS: Return `undefined` for whitespace-only CSS variable values (#5120)Michał Gołębiowski-Owczarek2022-10-031-1/+3
| | | | | | | | | | | | | | | | 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/+4
| | | | | | Fixes gh-5105 Closes gh-5106 Signed-off-by: Anders Kaseorg <andersk@mit.edu>
* Tests: Exclude tests based on compilation flags, not API presenceMichał Gołębiowski-Owczarek2022-06-281-5/+5
| | | | | | | | | | Introduces a new test API, `includesModule`. The method returns whether a particular module like "ajax" or "deprecated" is included in the current jQuery build; it handles the slim build as well. The util was created so that we don't treat presence of particular APIs to decide whether to run a test as then if we accidentally remove an API, the tests would still not fail. Fixes gh-5069 Closes gh-5046
* Docs: Fix incorrect `trac-NUMBER` referencesMichał Gołębiowski-Owczarek2022-01-121-1/+1
| | | | | | | | PR gh-4993 changed a few too many issue references to `trac-NUMBER` ones. This change fixes them. It also fixes a typo in one Trac issue number in selector tests. Ref gh-4993 Closes gh-4995
* Docs: Replace `#NUMBER` Trac issue references with `trac-NUMBER`Michał Gołębiowski-Owczarek2022-01-041-40/+40
| | | | | | | | | | | | | 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-8/+23
| | | | | | | | 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
* Tests: Switch background image from online file to local 1x1.jpgTimo Tijhof2021-05-241-18/+8
| | | | | Also, remove unused `expected` property in `css` test cases. Closes gh-4866
* Core: Drop support for Edge Legacy (i.e. non-Chromium Microsoft Edge)Michał Gołębiowski-Owczarek2020-09-221-7/+5
| | | | | | | | | | | | 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
* CSS: Include `show`, `hide` & `toggle` methods in the jQuery slim buildMichał Gołębiowski-Owczarek2020-05-051-5/+0
| | | | | | | | | | | | The `show()`, `hide()` & `toggle()` methods were included in the 3.x jQuery slim build. The jQuery master build accidentally started to exclude them as they were only imported in the effects module and the new Rollup-based build system follows the module dependency graph when excluding modules. To resolve the issue, import the `css/showHide.js` file directly in the main `jquery.js` file. Closes gh-4704 Ref jquery/jquery-migrate#346
* Manipulation: Make jQuery.htmlPrefilter an identity functionMichał Gołębiowski-Owczarek2020-03-161-56/+56
| | | Closes gh-4642
* Docs: Update most URLs to HTTPSMichał Gołębiowski-Owczarek2019-10-211-1/+1
| | | Closes gh-4511
* CSS: Workaround buggy getComputedStyle on table rows in IE/EdgeMichał Gołębiowski-Owczarek2019-10-141-0/+20
| | | | Fixes gh-4490 Closes gh-4506
* Selector: Inline Sizzle into the selector moduleMichał Gołębiowski-Owczarek2019-07-291-5/+13
| | | | | | | | | | | | | | | | | | This commit removes Sizzle from jQuery, inlining its code & removing obsolete workarounds where applicable. The selector-native module has been removed. Further work on the selector module may decrease the size enough that it will no longer be necessary. If it turns out it's still useful, we'll reinstate it but the code will look different anyway as we'll want to share as much code as possible with the existing selector module. The Sizzle AUTHORS.txt file has been merged with the jQuery one - people are sorted by their first contributions to either of the two repositories. The commit reduces the gzipped jQuery size by 1460 bytes compared to master. Closes gh-4395
* Core: Remove IE-specific support tests, rely on document.documentModeMichał Gołębiowski-Owczarek2019-05-131-118/+94
| | | | | | | 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-58/+21
| | | | | | | | | | | 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-27/+0
| | | | Fixes gh-4056 Closes gh-4364
* Data: Separate data & css/effects camelCase implementationsMichał Gołębiowski-Owczarek2019-04-291-0/+15
| | | | | | | | 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-2/+80
| | | | | | Fixes gh-2795 Closes gh-4055 Ref gh-4009
* Build: Update QUnit from 1.23.1 to 2.9.2Michał Gołębiowski-Owczarek2019-03-041-1/+1
| | | Closes gh-4307
* Build: Update test code for compatibility with QUnit 2.x (#4297)abnud12019-02-181-2/+2
| | | | | | | | Also, run `grunt npmcopy` to sync the "external" directory with dependencies from package.json. For example, the Sinon library version didn't match. Ref gh-4234 Closes gh-4297
* Core: Recognize Shadow DOM in attachment checksSaptak Sengupta2018-11-091-0/+80
| | | | | | | Allow `isAttached` to check Shadow DOM for attachment. Fixes gh-3504 Closes gh-3996 Ref gh-3977
* Tests: Add tests for not auto-appending "px" to CSS Grid propertiesMichał Gołębiowski-Owczarek2018-10-031-0/+50
| | | | | Ref gh-4007 Ref gh-4028 Closes gh-4165
* Test: enable a spec testing CSS whitespace preserving in Edge 17Michał Gołębiowski-Owczarek2018-06-181-2/+2
| | | | | | | | In Edge 14-16 setting a style property to a whitespace-only value resets it to the default, forcing us to skip a relevant CSS test in Edge. Now that Edge 17 has fixed the issue we can re-enable this test there. Ref gh-3204 Closes gh-4101
* CSS: Don't auto-append "px" to CSS variables (#4064)Michał Gołębiowski-Owczarek2018-06-041-0/+15
| | | | Fixes gh-4063 Closes gh-4064
* CSS: Correctly detect scrollbox support with non-default zoomRichard Gibson2018-05-071-3/+4
| | | | Fixes gh-4029 Closes gh-4030
* CSS: Ensure camel- vs kebab-cased names are not collapsed for CSS varsMichał Gołębiowski-Owczarek2018-05-021-0/+2
| | | Closes gh-4062
* Tests: fix weird failure in Edge 16 CSSTimmy Willison2018-01-161-1/+1
| | | | | Fixes gh-3866 Close gh-3932
* Core: deprecate jQuery.isNumericJason Bedard2018-01-151-2/+2
| | | | | Fixes gh-2960 Closes gh-3888
* Tests: Add support for running unit tests via grunt with karmaTimo Tijhof2017-12-181-3/+2
| | | | | | | | | | | | | - Update QUnit to 1.23.1 - Remove unused dl#dl from test/index.html - Remove unused map#imgmap from test/index.html - Ensure all urls to data use baseURI - Add the 'grunt karma:main' task - customContextFile & customDebugFile - Add 'npm run jenkins' script Close gh-3744 Fixes gh-1999
* CSS: Correctly set support properties with non-default zoomSaptak Sengupta2017-12-051-0/+9
| | | | Fixes gh-3808 Closes gh-3872
* Tests: Update lineHeight adjustments to give Android more slopRichard Gibson2017-09-081-9/+9
|
* CSS: Avoid unit-conversion interference from CSS upper boundsRichard Gibson2017-08-281-0/+16
| | | | Fixes gh-2144 Closes gh-3745
* Docs:Tests: Update IE/Edge-related support comments & testsMichał Gołębiowski2017-05-151-14/+15
| | | Closes gh-3661
* Tests: Clean up after the CSS Custom Properties support testMichał Gołębiowski2017-03-071-2/+4
| | | | | Ref bcec54ee7271e2d0e427bcb246e3d2009a8f84f9 Ref 619bf98d5b479f9582dbc40259b666f1c5a83146
* Tests: Skip CSS custom properties tests in non-supporting browsersMichał Gołębiowski2017-03-071-55/+66
| | | | Ref 619bf98d5b479f9582dbc40259b666f1c5a83146
* CSS: Support custom propertiesConnor Atherton2017-03-071-0/+64
| | | | | | Fixes gh-3144 Closes gh-3199 Closes gh-3557
* Tests: Disable a whitespace-setting test in Edge 14Michał Gołębiowski2016-09-121-1/+10
| | | | | | | | | | | | | | Working around this problem would require us to skip setting whitespace-only values except when they're valid which would be very fragile. Another option would be to set the value and see if it succeeded and then react to that. We've tried something like that in the past to be able to overwrite !important styles (see 24e5879) but it broke the CSS cascade (see https://bugs.jquery.com/ticket/14836#comment:5) and was triggering MutationObserver callbacks too often so it was reverted in PR gh-1532. Ref gh-3204 Ref gh-1532
* Build: ESLint detailsOleg Gaidarenko2016-06-111-16/+16
| | | | | | Use eslint pragmas, fix new errors, etc Closes gh-3148
* Tests: Refactor testIframe() to make it DRYer and more consistentDave Methvin2016-04-111-2/+2
| | | | | Ref gh-3040 Closes gh-3049
* CSS: Toggle detached elements as visible unless they have display: noneRichard Gibson2016-04-111-0/+24
| | | | | Fixes gh-2863 Closes gh-3037
* Docs: Update support comments to follow the new syntaxMichał Gołębiowski2016-03-301-1/+1
| | | | | The changes follow the spec proposed in: https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-69379197
* Docs:Tests: Remove legacy code & add support comments where neededMichał Gołębiowski2016-03-301-22/+16
| | | | | | | | This commits backports some changes done in the patch to the then-existing compat branch that removed support for old browsers and added some support comments. Refs 90d7cc1d8b2ea7ac75f0eacb42439349c9c73278