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

Premailer should convert color names to six character hex #109

Open
joevandyk opened this issue Mar 30, 2012 · 4 comments
Open

Premailer should convert color names to six character hex #109

joevandyk opened this issue Mar 30, 2012 · 4 comments

Comments

@joevandyk
Copy link

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')

@alexdunae
Copy link
Contributor

Wow, wouldn't have guessed that named colours would be an issue. We'll get this fixed.

(Thanks for detailed issue report, too. Much appreciated).

@joevandyk
Copy link
Author

Great!

By the way, I think the same problem can exist with 3 character hex (#fff). Safest thing is to probably convert all colors to six characters.

@alexdunae
Copy link
Contributor

Six chars it is.

@kbav
Copy link

kbav commented Nov 30, 2012

I noticed recently that one of my premail'd emails was using a "#fff" for white. It's a case of user error — that #fff was in the code I fed to Premailer — but maybe Premailer could fix this for noobs like me? :)

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

3 participants