fix(email-styles): Remove img height:auto; causing images to stretch based on their intrinsic size

We constrain images to a max-width of 600px. We have logic to change width and height attributes of inline attachments when both specified (and larger than 600px). This `height:auto` flag causes the image below to render at 600x600 because it's a 1x1 image:

<img src="http://image.lyftmail.com/lib/fe6915707166047a7d14/m/1/spacer.gif" height="1" width="600" style="display: block; width: 600px; min-width: 600px;" border="0">

I think the height:auto case only happens when A) the image is more than 600px wide B) the image has a hard-coded height and not a hard-coded width. In this case our max-width rule will change the width and the height will be fixed. I think we should disregard this case unless we find scenarios where it happens.
This commit is contained in:
Ben Gotow 2015-08-10 14:12:38 -07:00
parent 06d1ab6aad
commit e2a1658ab3

View file

@ -60,7 +60,6 @@
img {
max-width: 100%;
height: auto;
border: 0;
}