Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
)
} else if (isMediaQuery(property)) {
const combinedMediaQuery = generateCombinedMediaQuery(
media,
property.slice(6).trim()
)
renderer._renderStyleToCache(
className,
value,
pseudo,
combinedMediaQuery,
support
)
} else if (isSupport(property)) {
const combinedSupport = generateCombinedMediaQuery(
support,
property.slice(9).trim()
)
renderer._renderStyleToCache(
className,
value,
pseudo,
media,
combinedSupport
)
} else {
// TODO: warning
}
} else if (!isUndefinedValue(value)) {
ruleset[property] = value
}
media,
support
)
} else if (isMediaQuery(property)) {
const combinedMediaQuery = generateCombinedMediaQuery(
media,
property.slice(6).trim()
)
classNames += renderer._renderStyleToClassNames(
value,
pseudo,
combinedMediaQuery,
support
)
} else if (isSupport(property)) {
const combinedSupport = generateCombinedMediaQuery(
support,
property.slice(9).trim()
)
classNames += renderer._renderStyleToClassNames(
value,
pseudo,
media,
combinedSupport
)
} else {
console.warn(`The object key "${property}" is not a valid nested key in Fela.
Maybe you forgot to add a plugin to resolve it?
Check http://fela.js.org/docs/basics/Rules.html#styleobject for more information.`)
}
} else {
const declarationReference = generateDeclarationReference(
): string {
let classNames = _className ? ` ${_className}` : ''
for (const property in style) {
const value = style[property]
if (isPlainObject(value)) {
if (isNestedSelector(property)) {
classNames += renderer._renderStyleToClassNames(
value,
pseudo + normalizeNestedProperty(property),
media,
support
)
} else if (isMediaQuery(property)) {
const combinedMediaQuery = generateCombinedMediaQuery(
media,
property.slice(6).trim()
)
classNames += renderer._renderStyleToClassNames(
value,
pseudo,
combinedMediaQuery,
support
)
} else if (isSupport(property)) {
const combinedSupport = generateCombinedMediaQuery(
support,
property.slice(9).trim()
)
classNames += renderer._renderStyleToClassNames(
value,
(ruleset, value, property) => {
if (isPlainObject(value)) {
if (isNestedSelector(property)) {
renderer._renderStyleToCache(
className,
value,
pseudo + normalizeNestedProperty(property),
media,
support
)
} else if (isMediaQuery(property)) {
const combinedMediaQuery = generateCombinedMediaQuery(
media,
property.slice(6).trim()
)
renderer._renderStyleToCache(
className,
value,
pseudo,
combinedMediaQuery,
support
)
} else if (isSupport(property)) {
const combinedSupport = generateCombinedMediaQuery(
support,
property.slice(9).trim()
)