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

3-character hex codes should be converted to 6-character hex codes #94

Open
devend711 opened this issue Jan 23, 2018 · 0 comments
Open

Comments

@devend711
Copy link

devend711 commented Jan 23, 2018

Some browsers and email clients have trouble with 3-character hex codes:

https://litmus.com/blog/background-colors-html-email

We can help by making sure that any 3-character hex code is turned into the 6-character equivalent.

See this issue in the premailer/premailer repo: premailer/premailer#109

Colors in html emails work best as a six character hex ('#ffffff') rather than '#fff' or 'white'. See sass/sass#343 for details.

Somewhat unfortunately, sass will convert '#ffffff' to 'white'. When premailer inlines css generated by sass, it will insert 'white' instead of '#ffffff'.

sass/sass#343 goes over the sass issue. I believe sass's position is correct by saying this is something that should be fixed in premailer.

Examples of how html email can be broken by using 'white' or '#fff':

https://joevandyk.litmus.com/pub/ddace69 (email with 'white' embedded in the email, same thing happens with '#fff')
https://joevandyk.litmus.com/pub/350f5cf (exact same email, except with '#ffffff' in place of 'white')

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

No branches or pull requests

1 participant