madskristensen / EditorColorPreview

Apache License 2.0
21 stars 4 forks source link

Color with CSS Custom Properties do not display preview #10

Open graymatter00 opened 1 year ago

graymatter00 commented 1 year ago

Colors constructed using CSS Custom Properties do not display the color preview.

See attached screenshot.

Expected behavior Colors constructed using CSS Custom Properties should display the color preview.

image

y2k4life commented 5 months ago

Color Preview does not support CSS custom properties. Color Preview is a line interpreter and not a CSS processor. A line is identified as having a particular token (color, hsl, etc...) then further analysis is done to interpreter the values to calculate the color. Color Preview does not know how to calculate a color with values of var(--foo-baz-bar).