Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

Sandbox HTML parts #299

Open
moggers87 opened this issue Jan 20, 2018 · 4 comments
Open

Sandbox HTML parts #299

moggers87 opened this issue Jan 20, 2018 · 4 comments

Comments

@moggers87
Copy link
Member

Currently, we do a lot of processing to make HTML parts safe. One of these is to use premailer to inline any CSS found in <style> tags so that email styles don't interfere with the UI.

However, this breaks things like media queries and we have to be careful not to load external styles.

We could use <iframe>s with the srcdoc attribute to allow normal <style> tag operation with media queries and such which would mean fewer styling issues with HTML parts.

@moggers87
Copy link
Member Author

I wonder if this would resolve #404 ?

@moggers87
Copy link
Member Author

Works well, except that we can't set the iframe height to the same height as the content without JS.

@moggers87
Copy link
Member Author

Closing this issue as making Inboxen require users to have JS enabled is not something we want to do.

@moggers87
Copy link
Member Author

Actually, I'm wondering if we could just set the iframes to 80vh (or something similar) with scrollbars enabled which can then be turned off with the same JS that resizes the iframe.

I think this would be fine as most emails only have one MIME part displaying at a time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant