- Notifications
You must be signed in to change notification settings - Fork20.6k
Commit7eb0019
authored
CSS: Return
The spec requires that CSS variable values are trimmed. In browsers that dothis - mainly, Safari, but also Firefox if the value only has leadingwhitespace - we currently return undefined; in other browsers, we returnan empty string as the logic to fall back to undefined happens beforetrimming.This commit adds another explicit callback to `undefined` to have it consistentacross browsers.Also, more explicit comments about behaviors we need to work around in variousbrowsers have been added.Closesgh-5120Refgh-5106undefined
for whitespace-only CSS variable values (#5120)1 parent2540075 commit7eb0019
2 files changed
+27
-5
lines changedLines changed: 24 additions & 4 deletions
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 |
| |
|
Lines changed: 3 additions & 1 deletion
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
Comments
(0)