fixes parseCSS when inline includes media queries

This commit is contained in:
Jon McClure 2023-09-01 15:38:33 +01:00
parent 4664808ad8
commit c6a52df97e

View file

@ -8,6 +8,8 @@ export const cssStringToTableArray = (cssString, withInclude = false) => {
const className = key.replace(/_/g, '-');
const properties = Object.entries(value)
.map(([propName, propValue]) => {
// Excludes any media query-ied stuff...
if (typeof propValue !== 'string') return '';
return `${kebabCase(propName)}: ${propValue.replace(
/\s?!important/g,
''