guardian/mobile-apps-article-templates — pull request #288 by jglueck (2014-09-15 10:35:25+00:00)
Title: And 3041

I changed the articleImageSizer function in common.js as the for each loop was not running. The selectors being targeted were using direct child which was too specific as the target element img was in fact not a direct child due to the anchor tag. I've now fixed this by removing the direct child selector '>' and added inline style to figure-width class to size to 100% width and add figure inline class to images less than 301px in width as originally intended. Also removed the figureClassAdd function as no longer required and fixed Fig Caption from appearing to large as it shared styles with the figure.figure-wide and now only only applies a float left with figure.figure-inline to allow content to warp round the inline image.