• Resolved Quentin Pain

    (@qutezy)


    Google Search Console flagged up an AMP issue. This started on 18th April 2025 and grew rapidly to 600+ pages on the site. I haven’t added any plugins recently, so maybe it’s when the core WordPress updated to the latest version. GSC is reporting this warning: “CSS syntax error in tag ‘style amp-custom’ – malformed media query”. I can see the syntax error in the code: <style amp-custom=””> – my question is, why has this happened? I haven’t changed any of the settings in the AMP plugin, which is version 2.5.5 – is there anything I can do to fix this? Thank you for any pointers.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @qutezy

    Thanks for reaching out to us, based on the error message, it seems an invalid CSS rule from a plugin or theme might be the issue. To help us pinpoint the cause, could you please share your site’s health information?

    Can you please share your site health information using this form

    Looking forward to hearing from you!

    Thread Starter Quentin Pain

    (@qutezy)

    Mine actually started on the 17th April 2025. Here’s a screenshot taken today (19tyh May 2025).

    This image has an empty alt attribute; its file name is amp.jpg
    • This reply was modified 9 months, 2 weeks ago by Quentin Pain.
    • This reply was modified 9 months, 2 weeks ago by Quentin Pain.
    Thread Starter Quentin Pain

    (@qutezy)

    Thank you @milindmore22 – report sent.

    Plugin Support Milind More

    (@milindmore22)

    Hello @qutezy

    Thank you for reaching out. Upon reviewing your website with the AMP test, we identified a warning related to a malformed media query.

    The root cause appears to be the following CSS:

    @media not (prefers-reduced-motion) {
    	.wp-block-navigation .has-child .wp-block-navigation__submenu-container {
    		transition: opacity .1s linear
    	}
    }

    The CSS is added for navigation block where it cannot validate @media query with not keyword.

    We are currently investigating a fix. It’s likely this issue will need to be addressed within the AMP repository rather than the WordPress plugin. We will keep you updated on our progress.

    Please be assured that this warning will not negatively impact your website’s performance.

    We hope this helps!

    Thread Starter Quentin Pain

    (@qutezy)

    Many thanks @milindmore22

    Plugin Support Milind More

    (@milindmore22)

    @qutezy 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 6 replies - 1 through 6 (of 6 total)

The topic ‘GSC reports a warning for style amp-custom’ is closed to new replies.