From 6b67d301bfd2b9c088bfcdcd14f2031f99af9a2b Mon Sep 17 00:00:00 2001 From: Fiona Hopkins Date: Mon, 9 Dec 2019 11:45:59 -0500 Subject: [PATCH] Moves responsive image CSS back into attribute (#19888) * Moves responsive image CSS back into attribute Fixes #17593 This PR reverts a part of #14816 that moved the image styles into a , - ]) -} diff --git a/packages/gatsby-remark-images/src/index.js b/packages/gatsby-remark-images/src/index.js index 022b171190b50..06e097fb49a03 100644 --- a/packages/gatsby-remark-images/src/index.js +++ b/packages/gatsby-remark-images/src/index.js @@ -190,6 +190,15 @@ module.exports = ( ) } + const imageStyle = ` + width: 100%; + height: 100%; + margin: 0; + vertical-align: middle; + position: absolute; + top: 0; + left: 0;`.replace(/\s*(\S+:)\s*/g, `$1`) + // Create our base image tag let imageTag = ` `.trim()