proper color fallbacks

This commit is contained in:
Henry Jameson 2024-10-11 20:48:46 +03:00
commit 1ec1ba8d3e
4 changed files with 39 additions and 7 deletions

View file

@ -62,7 +62,7 @@ const findShadow = (shadows, { dynamicVars, staticVars }) => {
})
}
const findColor = (color, { dynamicVars, staticVars }) => {
export const findColor = (color, { dynamicVars, staticVars }) => {
if (typeof color !== 'string' || (!color.startsWith('--') && !color.startsWith('$'))) return color
let targetColor = null
if (color.startsWith('--')) {