Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
)
} else {
// TODO: warning
}
} else if (!isUndefinedValue(value)) {
ruleset[property] = value
}
return ruleset
},
{}
)
if (Object.keys(ruleSet).length > 0) {
const css = cssifyObject(ruleSet)
const selector = generateCSSSelector(className, pseudo)
const change = {
type: RULE_TYPE,
className,
selector,
declaration: css,
media,
}
const declarationReference = selector + media + support
renderer.cache[declarationReference] = change
renderer._emitChange(change)
}
}
className: '',
}
/* eslint-disable no-continue */
continue
/* eslint-enable */
}
const className =
renderer.selectorPrefix +
generateClassName(
renderer.getNextRuleIdentifier,
renderer.filterClassName
)
const declaration = cssifyDeclaration(property, value)
const selector = generateCSSSelector(className, pseudo)
const change = {
type: RULE_TYPE,
className,
selector,
declaration,
pseudo,
media,
support,
}
renderer.cache[declarationReference] = change
renderer._emitChange(change)
}
const cachedClassName = renderer.cache[declarationReference].className
export default function generateCacheEntry(
type: StyleType,
className: string,
property: string,
value: any,
pseudo?: string = '',
media?: string = '',
support?: string = ''
): Object {
return {
type,
className,
selector: generateCSSSelector(className, pseudo),
declaration: property + ':' + value,
pseudo,
media,
support,
}
}