Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve styles to modify the webmail container #239

Open
sanderkruger opened this issue Oct 2, 2015 · 3 comments
Open

Preserve styles to modify the webmail container #239

sanderkruger opened this issue Oct 2, 2015 · 3 comments
Milestone

Comments

@sanderkruger
Copy link
Contributor

Emogrifier does a good job cleaning up the styles but this makes it impossible to add fixes for quirks in email readers that intend to modify known classes that the email reader uses.

For example, selectors .ExternalClass or #outlook a are widely used to fix some issues with Outlook. While these quirks are bound to disappear over time, since they are still used, it would be useful to be able to keep them in the emogrified HTML.

Emogrifier needs an option to leave certain CSS rules in the <style> section in the header.

@oliverklee oliverklee changed the title Styles to modify the webmail container are not preserved Preserver styles to modify the webmail container Oct 2, 2015
@oliverklee
Copy link
Contributor

What do you about a whitelist of styles that are specific to certain webmail containers?

(And doesn't Outlook properly filter/sandbox CSS that might affect the container? AFAIK, Google Mail does that.)

@sanderkruger sanderkruger changed the title Preserver styles to modify the webmail container Preserve styles to modify the webmail container Oct 2, 2015
@sanderkruger
Copy link
Contributor Author

I've seen a lot of articles that try to modify styles of the container of an email, so I think there is or has been a need/purpose for these. I have not been able to see any of these actually make a difference, so the examples I gave may be obsolete now.

Nonetheless, it seemed useful to me to have an option on emogrifier that tells it not to touch certain CSS rules and leave them in the head section, for example if you want to test new quirks. A whitelist could do the trick, allthough I think the best solution is a method to specify the rules you want preserved (so that future users can test new rules).

@oliverklee
Copy link
Contributor

Sounds fair.

@oliverklee oliverklee added this to the 4.0.0 milestone Jan 7, 2018
@oliverklee oliverklee modified the milestones: 4.0.0, 5.0.0 Jun 11, 2020
@oliverklee oliverklee modified the milestones: 5.0.0, 6.0.0, Backlog Nov 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants