weixin_39888268 2020-11-30 04:08 采纳率: 0%
浏览 0

Inline style adding a fixed width to responsive images within a <figure>

Updated our site to AMP 1.0.1 and we are experiencing style issues for images within <figure> tags.

Our <figure> tags are set to center align using margin: 0 auto. The plugin is now adding the following inline CSS style:


/* Inline stylesheets */
:root:not(#_):not(#_):not(#_):not(#_):not(#_) .amp-wp-30b254f{width:630px}

The amp-wp-## class is an md5 hash generated by the plugin.

The fixed width declaration on the <figure> is causing images to overflow the viewport and not behave responsively. This does not occur on non-captioned images that are not enclosed in <figure>.

I have removed the amp_post_template_css action as a temporary workaround.

该提问来源于开源项目:ampproject/amp-wp

  • 写回答

0条回答 默认 最新

    报告相同问题?