Commit 8bea1de
committed
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-5106
(cherry picked from commit 7eb0019)undefined for whitespace-only CSS variable values (#5120)1 parent 9eb47cc commit 8bea1de
2 files changed
+27
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
31 | 41 | | |
32 | 42 | | |
33 | | - | |
34 | | - | |
| 43 | + | |
35 | 44 | | |
36 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
37 | 57 | | |
38 | 58 | | |
39 | 59 | | |
40 | 60 | | |
41 | | - | |
| 61 | + | |
42 | 62 | | |
43 | 63 | | |
44 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1760 | 1760 | | |
1761 | 1761 | | |
1762 | 1762 | | |
| 1763 | + | |
1763 | 1764 | | |
1764 | 1765 | | |
1765 | 1766 | | |
| |||
1769 | 1770 | | |
1770 | 1771 | | |
1771 | 1772 | | |
1772 | | - | |
| 1773 | + | |
1773 | 1774 | | |
1774 | 1775 | | |
1775 | 1776 | | |
| |||
1815 | 1816 | | |
1816 | 1817 | | |
1817 | 1818 | | |
| 1819 | + | |
1818 | 1820 | | |
1819 | 1821 | | |
1820 | 1822 | | |
| |||
0 commit comments