Commit 7eb0019
authored
CSS: Return
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-5106undefined for whitespace-only CSS variable values (#5120)1 parent 2540075 commit 7eb0019
2 files changed
+27
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | | - | |
18 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
20 | 40 | | |
21 | 41 | | |
22 | 42 | | |
23 | 43 | | |
24 | 44 | | |
25 | | - | |
| 45 | + | |
26 | 46 | | |
27 | 47 | | |
28 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1748 | 1748 | | |
1749 | 1749 | | |
1750 | 1750 | | |
| 1751 | + | |
1751 | 1752 | | |
1752 | 1753 | | |
1753 | 1754 | | |
| |||
1757 | 1758 | | |
1758 | 1759 | | |
1759 | 1760 | | |
1760 | | - | |
| 1761 | + | |
1761 | 1762 | | |
1762 | 1763 | | |
1763 | 1764 | | |
| |||
1803 | 1804 | | |
1804 | 1805 | | |
1805 | 1806 | | |
| 1807 | + | |
1806 | 1808 | | |
1807 | 1809 | | |
1808 | 1810 | | |
| |||
0 commit comments