jquery/src
Michał Gołębiowski-Owczarek 8bea1dec18 CSS: Return undefined for whitespace-only CSS variable values (#5120)
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

(cherry picked from commit 7eb0019640)
2022-10-03 22:45:52 +02:00
..
ajax Docs: Replace #NUMBER Trac issue references with trac-NUMBER 2022-01-12 23:23:10 +01:00
attributes CSS: Skip falsy values in addClass( array ), compress code 2022-01-25 00:35:50 +01:00
core Docs: Replace #NUMBER Trac issue references with trac-NUMBER 2022-01-12 23:23:10 +01:00
css CSS: Return undefined for whitespace-only CSS variable values (#5120) 2022-10-03 22:45:52 +02:00
data Docs: Replace #NUMBER Trac issue references with trac-NUMBER 2022-01-12 23:23:10 +01:00
deferred Deferred: Give better stack diagnostics on exceptions 2016-05-11 20:21:04 -04:00
deprecated Build: Correct code indentations based on jQuery Style Guide 2020-05-05 13:04:46 +02:00
effects Build: Correct code indentations based on jQuery Style Guide 2020-05-05 13:04:46 +02:00
event Docs: Replace #NUMBER Trac issue references with trac-NUMBER 2022-01-12 23:23:10 +01:00
exports Docs: Replace #NUMBER Trac issue references with trac-NUMBER 2022-01-12 23:23:10 +01:00
manipulation Docs: Replace #NUMBER Trac issue references with trac-NUMBER 2022-01-12 23:23:10 +01:00
queue Docs: Remove links to Web Archive from source 2022-01-04 16:36:20 +01:00
traversing Filter: Use direct filter in winnow 2018-01-17 11:01:08 -05:00
var CSS: Trim whitespace surrounding CSS Custom Properties values 2021-10-18 22:43:59 +02:00
.eslintrc.json Build: Correct code indentations based on jQuery Style Guide 2020-05-05 13:04:46 +02:00
ajax.js Docs: Replace #NUMBER Trac issue references with trac-NUMBER 2022-01-12 23:23:10 +01:00
attributes.js Build: Put all AMD modules in "src/" in strict mode 2016-04-25 20:25:08 +02:00
callbacks.js Core: deprecate jQuery.type 2018-01-16 10:39:08 -05:00
core.js Build: Correct code indentations based on jQuery Style Guide 2020-05-05 13:04:46 +02:00
css.js Docs: Replace #NUMBER Trac issue references with trac-NUMBER 2022-01-12 23:23:10 +01:00
data.js Docs: Replace #NUMBER Trac issue references with trac-NUMBER 2022-01-12 23:23:10 +01:00
deferred.js Deferred: Rename master to primary 2021-01-12 21:04:59 +01:00
deprecated.js Deprecated: Improve $.trim performance for strings with lots of whitespace 2022-07-20 10:51:13 +02:00
dimensions.js Build: Correct code indentations based on jQuery Style Guide 2020-05-05 13:04:46 +02:00
effects.js Docs: Replace #NUMBER Trac issue references with trac-NUMBER 2022-01-12 23:23:10 +01:00
event.js Docs: Replace #NUMBER Trac issue references with trac-NUMBER 2022-01-12 23:23:10 +01:00
jquery.js Build:Tests: Fix custom build tests, verify on Travis; name Travis jobs 2020-01-27 18:54:47 +01:00
manipulation.js Docs: Replace #NUMBER Trac issue references with trac-NUMBER 2022-01-12 23:23:10 +01:00
offset.js Revert "Offset: Send px-ed strings to .css()" 2020-07-20 21:29:40 +02:00
queue.js Core: Deprecate jQuery.isArray 2016-11-30 12:22:24 +01:00
selector-native.js Docs: Replace #NUMBER Trac issue references with trac-NUMBER 2022-01-12 23:23:10 +01:00
selector-sizzle.js Build: Put all AMD modules in "src/" in strict mode 2016-04-25 20:25:08 +02:00
selector.js Build: ESLint details 2016-06-11 10:41:33 +03:00
serialize.js Build: Correct code indentations based on jQuery Style Guide 2020-05-05 13:04:46 +02:00
traversing.js Build: ESLint: forbid unused function parameters 2019-09-26 01:59:57 +02:00
wrap.js Core: deprecate jQuery.isFunction 2018-01-15 09:26:19 -08:00
wrapper.js Docs: Replace #NUMBER Trac issue references with trac-NUMBER 2022-01-12 23:23:10 +01:00