3

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?

3

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">

    <c:component1>

 </Div>
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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