styled-ppx
styled-ppx copied to clipboard
Improve error messaging when not filling entire property definitions (for example `box-shadow`)
let shadow = [%cx {|
box-shadow: 0 0 0 1px gray, 0 1px black;
|}]
fails with:
invalid property value: 0 0 0 1px gray, 0 1px black
For reference, single shadow works:
let shadow = [%cx {|
box-shadow: 0 0 0 1px gray;
|}]
Hi,
box-shadow (same as text-shadow) deserves a better error messaging here. Bot single values and multiple values are supported, but they need to be expressed with full form.
box-shadow:
12px 12px 2px 1px rgba(0, 0, 255, .2),
13px 14px 5px 6px rgba(2, 1, 255, 50%);
I will keep this issue open to remind me to improve the error message specifically for the properties that "half-match".