Clicky

  1. Home
  2. How To
  3. How to solve 50KB CSS Limit validation issue in AMP

How to solve 50KB CSS Limit validation issue in AMP

If you are facing this error The author stylesheet specified in tag ‘style amp-custom’ is too long then follow these two steps to fix it:

  1. Minify
  2. Optimize CSS

1. Minify

  • You will find this option in WordPress dashboard -> Navigate to AMP option panel -> Settings -> Performance -> Enable Minify option.
  • Minify: Minify is the process by which unnecessary space or characters are removed from the code. These spaces and characters are not necessary to run the code and hence just add size to the file. When they are removed, the files become lighter which in turn improves the page loading time. Minify is a great strategy to improve meet visitor’s expectations and rank better.

2. Optimize CSS

  • You will find this option in the WordPress Dashboard -> AMP option panel -> Settings -> Performance -> Enable “Optimize CSS(beta)” option and then click on the “Save Changes” button.
  • Optimize CSS(beta): Once you enable this option it will remove unused CSS and reduces the size of the CSS.
  • Want to clear the Cache?: Just click this option and hit save and it will automatically clear the Cache.
  • If you want to check how much CSS is optimized then you need to enable “Dev Mode in AMP‘ option. You will find this option in the WordPress Dashboard -> AMP option panel -> Settings -> Advanced Settings -> Enable “Dev Mode in AMP ” option.

Note: Once you check the optimization then make sure you disable the ” Dev Mode in AMP ” option.

That’s it for this tutorial!

We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.

Ask your Questions Directly!
If you can't find the solutions in this article, then just ask us in the comments and we will answer it for you!
Updated on February 10, 2020

    Are you still looking for a solution?

    Then fill out the below form and we will reach out to you within a few hours.

    Was this article helpful?

    Related Articles

    Comments

    1. Hi,
      I have a custom amp theme, I have activated the minimization of the code in the plugin settings but on the Home page it is not minimizing … what should I do?
      This is my configuration: https://pasteboard.co/JA3TxSn.png
      This is the home KO code: https://pasteboard.co/JA3TJ1N.png
      This is the code for an OK inner page:https://pasteboard.co/JA3TSAd.png

      It is very important to fix this since the home is not passing Google verification and I need it to pass.: https://pasteboard.co/JA3UB86.png

      I want to minimize Home page…that’s would solve it, but i dont know how…
      Thanks!

    Leave a Comment