CSS inlining error: DOMXPath::query(): Invalid expression in selector >> body << in /home/rcg40548/public_html/vendor/pelago/emogrifier/Classes/Emogrifier.php on line 374

I also have used this solution but it is not working.


create the files
in your custom theme and add the content from
/vendor/magento/theme-frontend-blank/web/css/email.less and
but each with the line "@import 'source/_theme.less';" commented out (or removed)

1 Answer 1


Facing the same issue:
I was using the php7.3 (Which is the main issue).
Just downgrade the php version 7.3 to 7.2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.