From e2a1658ab311e4db5c26d758869c923ba4d6f056 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Mon, 10 Aug 2015 14:12:38 -0700 Subject: [PATCH] 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: 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. --- static/email-frame.less | 1 - 1 file changed, 1 deletion(-) diff --git a/static/email-frame.less b/static/email-frame.less index 10e439fd8..556724119 100644 --- a/static/email-frame.less +++ b/static/email-frame.less @@ -60,7 +60,6 @@ img { max-width: 100%; - height: auto; border: 0; }