maizzle/maizzle-php

Feature Request: CSS Inline for production builds

Closed this issue · 1 comments

rokde commented

You need to have css inline to meet various email clients. Please add an out-of-the-box way for that. Otherwise the email templates are not usable for production.

This would be a really nice feature.

This is supported since the first release - it's done through a boolean in your environment config. The included npm run staging and npm run production commands are already configured to automatically inline CSS.

For example, here are the CSS inlining-related options from config.production.php, which is used by the npm run production command:

https://github.com/ThemeMountain/maizzle/blob/03f4c2a01ad2537ab46450ccab5d5e1d376b6bb3/config.production.php#L19-L32

Inlining (and most other post-processing) is disabled for local development (npm run dev or npm run watch), as it takes more time and is not needed when prototyping emails.