Commit b0138f6
committed
fix: use valid CSS color space names in toValue()
colorjs uses internal short names (p3, a98rgb, prophoto) that don't
match the CSS predefined color space identifiers required by the spec:
- p3 → display-p3
- a98rgb → a98-rgb
- prophoto → prophoto-rgb
This caused toValue() to emit invalid CSS like `color(p3 ...)`, which
the css-tree lexer rejects when re-validating the value in the CSS value
input (e.g. after a round-trip through the style panel).1 parent f4f2406 commit b0138f6
2 files changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
| 334 | + | |
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
| 364 | + | |
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
| 116 | + | |
116 | 117 | | |
117 | | - | |
| 118 | + | |
118 | 119 | | |
| 120 | + | |
119 | 121 | | |
| 122 | + | |
| 123 | + | |
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
| |||
0 commit comments