Ignore `content: var(--tw-content)` when determining color

master
Brad Cornes 2021-11-05 16:29:34 +00:00
parent ed51ba73a8
commit e47f5fa539
1 changed files with 4 additions and 1 deletions

View File

@ -62,7 +62,10 @@ function getColorFromDecls(
): culori.Color | KeywordColor | null {
let props = Object.keys(decls).filter((prop) => {
// ignore content: "";
if (prop === 'content' && (decls[prop] === '""' || decls[prop] === "''")) {
if (
prop === 'content' &&
(decls[prop] === '""' || decls[prop] === "''" || decls[prop] === 'var(--tw-content)')
) {
return false
}
return true