Basic Email Customisation Lacking

AI-generated summary

In a Support discussion titled “Basic Email Customisation Lacking” tagged with email, Ben_Sutton seeks help customizing Discourse email templates—specifically rounding buttons and increasing logo size—using custom CSS. He shares his current CSS code, which targets elements via attributes (e.g., img[alt="Company"]) due to lack of CSS classes in email templates, but reports it causes server errors and delivery issues. He’s open to rewriting email HTML if it’s sustainable across updates. Lilly suggests a Meta Discourse thread as a possible resource, but Ben_Sutton confirms it doesn’t solve his issue. The core problem remains: Discourse’s email templates lack class-based styling hooks, forcing fragile attribute selectors that break functionality.

I would like to do some basic customisations to my Emails such as:

  • Rounded Buttons (rounded everything tbh)
  • Increase Logo Size on Email Digest

How can this be done effectively? I’ve already tried to input Custom CSS into my Email Styling, but that’s caused problems with Server Errors & lack of Deliverability.

This is my simple custom code:

a, span {
border-radius: 20px !important;
}

img:not([alt="replies"], [alt="likes"]) {
border-radius: 8px !important;
}

div div[style*="margin-bottom:25px"] div[style*="padding-top:5px"] {
background-color: unset !important;
padding-top: 15px !important;
}

img[alt="Company"] {
height: 75px !important;
}

I expect that Discourse doesn’t like my CSS attribute targeting, but I felt forced to do them since there are no CSS classes available in the Email Templates. Does anyone have any better method to round things off and increase that logo size?

I’m not opposed to rewriting the Email HTML if it’s no hassle to overwrite the files and not lose them via updating etc.

Have you see this? Not sure if it would work for your case, but might be worth a try :thinking:

Unfortunately not, but thanks!