We are creating a component that is displaying HTML data from a template, as a preview for the user before sending it to a customer.

This style is looking good in emails as there is no previous CSS rules defined. Once we ask to display it in a Lightning component in SalesForce, it starts looking all messed up (alignments, li elements without icons, etc.)

Is there a way to reset, erase or get a fresh CSS context within a fullpage Lightning component?

1 Answer 1


Yes there is. What you need to do is place a DIV with a special lightning CSS class that wraps the content of where the email will be displayed in your component so your original html will pass through it without being affected by lightning styling like this:

<Div class="slds-text-longform">



You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .