The text inside tag 'style amp-custom' contains 'CSS !important' error for AMP

Posted in: Newspaper
Post count: 16

As the title says I cannot get the AMP plugin to work.

Going by googles AMP site test there is errors in the css.

Here is the test: http://www.gamersgreed.com/crash-bandicoot-n-sane-trilogy-easter-eggs-references/amp

The error states: The text inside tag ‘style amp-custom’ contains ‘CSS !important’, which is disallowed.

I’ve only added 4 custom css styles, all of which have no !important tag.

Could you please help me in locating the error? thanks

Post count: 16

narrowed it down to AMP-WP-Footer: Display: none !important;

but i’m having trouble finding the source.

Post count: 22421

Hello,

The amp issues were fixed in the later updates. Please update your theme to the latest version by using this guide: https://forum.tagdiv.com/how-to-update-the-theme-2/ and make sure you also update the theme plugin by disabling and deleting the ones you currently have installed and installing theme again from the main theme package (version 8.7.3).

Thank you!

Post count: 96

My site is running on version 9.0.1 but still get the same issue.

Post count: 96
Post count: 20685

Now that is unusual, those issues were fixed quite a while back, there were no other reports since then. There are no more !important tags in the AMP stylesheet, all were removed.

But still it seems in your case !important is detected for some reason. I tested some other posts from your website, there are no errors there. But the same stylesheet is loaded for all posts, so why for some posts it detects the tag and in some not is unusual.

I see an unusual link in the post content, with some invalid CSS
https://www.screencast.com/t/6mrlPuHqX
Could you try as a test to remove that link and check if the same is detected, use the AMP validator tool
https://validator.ampproject.org/

Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.