Loading...
Asked by Willie Kim on Jun 11, 2024
Willie wants to know if there's a way, possibly using the HubSpot CLI (`hs upload`), to automatically inject CSS rules from a stylesheet as inline styles onto HTML elements within email modules, to ensure compatibility with email clients that don't support CSS classes.
Answered by Evelynn Ulsh
Evelynn explains that HubSpot has a built-in feature for this. By adding `id="hs-inline-css"` to a `<style>` tag within the email template or module, HubSpot will process the CSS rules inside that tag and apply them as inline styles to the corresponding elements in the email upon saving or sending. She notes some limitations, like it not being module-scoped.