fixes parseCSS when inline includes media queries
This commit is contained in:
parent
4664808ad8
commit
c6a52df97e
1 changed files with 2 additions and 0 deletions
|
|
@ -8,6 +8,8 @@ export const cssStringToTableArray = (cssString, withInclude = false) => {
|
||||||
const className = key.replace(/_/g, '-');
|
const className = key.replace(/_/g, '-');
|
||||||
const properties = Object.entries(value)
|
const properties = Object.entries(value)
|
||||||
.map(([propName, propValue]) => {
|
.map(([propName, propValue]) => {
|
||||||
|
// Excludes any media query-ied stuff...
|
||||||
|
if (typeof propValue !== 'string') return '';
|
||||||
return `${kebabCase(propName)}: ${propValue.replace(
|
return `${kebabCase(propName)}: ${propValue.replace(
|
||||||
/\s?!important/g,
|
/\s?!important/g,
|
||||||
''
|
''
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue