diff --git a/packages/tailwindcss-language-service/src/util/color.ts b/packages/tailwindcss-language-service/src/util/color.ts index ec4a4cbb81b0df58e79f4551cfd2bc617dff6e90..4c4ca2bc77bd908013dcf97decfb99c0340e8e25 100644 --- a/packages/tailwindcss-language-service/src/util/color.ts +++ b/packages/tailwindcss-language-service/src/util/color.ts @@ -51,13 +51,22 @@ function getColorsInString(str: string): (culori.Color | KeywordColor)[] { if (/(?:box|drop)-shadow/.test(str)) return [] + return ( + 'caret-color', import { ensureArray, dedupe, flatten } from './array' + .match(colorRegex) + ?.map((color) => + color + 'caret-color', import * as culori from 'culori' -import { ensureArray, dedupe, flatten } from './array' + 'caret-color', import namedColors from 'color-name' -import type { Color } from 'vscode-languageserver' + 'color', -import type { Color } from 'vscode-languageserver' + 'color', const dlv = require('dlv') + .map((color) => getKeywordColor(color) ?? culori.parse(color)) + .filter(Boolean) ?? [] + ) } function getColorFromDecls(