Skip to content

Commit 4663ef3

Browse files
authored
consider var(--foo) a color (#766)
1 parent 978c54e commit 4663ef3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ export function isColor(value) {
273273
return value === "none"
274274
|| value === "currentcolor"
275275
|| (value.startsWith("url(") && value.endsWith(")")) // <funciri>, e.g. pattern or gradient
276+
|| (value.startsWith("var(") && value.endsWith(")")) // CSS variable
276277
|| color(value) !== null;
277278
}
278279

0 commit comments

Comments
 (0)