adobe/aem-core-email-components

Style inliner - Not working as expected when CSS is generated by using ui.frontend and npm run prod

priyankpardiwala opened this issue · 0 comments

We have noticed a strange issue with style inliner where it breaks when we generate CSS using ui.frontend module and run the npm run prod command.

When we run npm run prod command for ui.frontend module, it generates CSS file in such a way that the last css rule for each class/element does not get a semi-colon.

For example, the generated css would look something like this -

img{
 width: 50px; 
height: 100px
}

Notice that the last css rule height does not end with a semicolon.

When we run Style Inliner on a page that uses this CSS, everything breaks.

To work around this, we are currently running "npm run dev" command, which generates a CSS file where all rules end with a semi colon.

While not a show stopper, we wanted to see if there is a way to either update the Style Inliner or configure ui.frontend module so that it produces a valid CSS file.