Goal:
Display an email message that comes in HTML format
Steps:
- Added HTML component
- Added HTML text to Content --> HTML. Text example:
<!DOCTYPE html>
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<style> <!-- Some styles --> </style>
</head>
<body style="background-color:#fff;margin:0;padding:0;-webkit-text-size-adjust:none;text-size-adjust:none">
![Screenshot 2024-12-04 at 18.14.52|690x460](upload://7j3kHVzP9cs7HqjRa9CkCz4kCgJ.png)
</body>
</html>
The problem
Retool’s HTML component wraps the content in a shadow DOM, but the Retool styles are still being passed into the shadow DOM (through :host
) and applied to the email content, which affects its appearance.
Screenshots:
I didn't add this selectors
Question:
How I can if it’s possible to disable the passing of styles to the shadow DOM when using Retool’s HTML component?
Or do we have other ways to display the email properly?