aboutsummaryrefslogtreecommitdiffstats
path: root/src/css
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2023-09-20 00:54:40 +0200
committerGitHub <noreply@github.com>2023-09-20 00:54:40 +0200
commit93ca49e6d1ac23fee33b3bc3b7f4d93dd1a25cb7 (patch)
tree26a2692a0e704e48348b45814e341777c4cbaed3 /src/css
parent46f6e3da796ee9d28c7c1428793b72d66bcbb0b7 (diff)
downloadjquery-93ca49e6d1ac23fee33b3bc3b7f4d93dd1a25cb7.tar.gz
jquery-93ca49e6d1ac23fee33b3bc3b7f4d93dd1a25cb7.zip
Core: Simplify code post browser support reduction
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
Diffstat (limited to 'src/css')
-rw-r--r--src/css/curCSS.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/css/curCSS.js b/src/css/curCSS.js
index 06394f315..16104d893 100644
--- a/src/css/curCSS.js
+++ b/src/css/curCSS.js
@@ -13,6 +13,10 @@ export function curCSS( elem, name, computed ) {
// getPropertyValue is needed for `.css('--customProperty')` (gh-3144)
if ( computed ) {
+ // A fallback to direct property access is needed as `computed`, being
+ // the output of `getComputedStyle`, contains camelCased keys and
+ // `getPropertyValue` requires kebab-case ones.
+ //
// Support: IE <=9 - 11+
// IE only supports `"float"` in `getPropertyValue`; in computed styles
// it's only available as `"cssFloat"`. We no longer modify properties