• Resolved blackpearlyc8

    (@blackpearlyc8)


    I have a scenario where I am using the below CSS:

    div#check-iframe:has(iframe) 

    I am adding this CSS in headers.php like below:

    <style amp-custom>
    div#check-iframe:has(iframe) {
    /* Your styles here */
    }
    </style>

    But using the AMP plugin, it is getting converted as below:

    div#check-iframe:has(amp-iframe)

    I don’t want to convert my CSS from iframe to amp-iframe. Can anyone help me to solve this ASAP?

    • This topic was modified 6 months, 3 weeks ago by blackpearlyc8.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @blackpearlyc8

    Thank you for contacting us. The AMP plugin will transform your iframe tag into a web component amp-iframe. This conversion ensures that you have valid AMP pages with valid AMP tags.

    However, if you want AMP-specific CSS, you can use

    html[amp] div#check-iframe:has(amp-iframe) {
         /* AMP specific CSS here */
    }
    

    Please check our documentation about AMP-specific CSS.

    We hope this helps!

    Plugin Support Milind More

    (@milindmore22)

    @blackpearlyc8 As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you require any further assistance.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘iframe -> amp-iframe css issue’ is closed to new replies.