0

I have noticed that the AMP Validator,

(a) doesn't tell you how big your CSS file is until it is too big. (b) when it is too big and you manually count the length of your CSS it still seems to be smaller than the 50,000 limit.

Anyone have any ides why?

PS My solution is to properly compress for the page the CSS but I can't do this easily in real time so a few edge pages get through with slightly too large CSS files (but that are still less than 50,000 when I count their lenght).

Alan Jay
  • 151
  • 1
  • 11
  • Checking the [documentation](https://amp.dev/documentation/guides-and-tutorials/learn/validation-workflow/validate_amp?format=websites), it was specified that AMP Validator is intended to tell the page if it is "Fail" or "Pass" nothing more. I think that is a behavior of it that you need to report to the [AMP Support](https://amp.dev/support/) as feature request if that's really what you needed. But I guess you need to follow the [rules](https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml) they set for AMP. – MαπμQμαπkγVπ.0 May 16 '19 at 08:27

1 Answers1

0

It is not 50000 lines. It is 50000 bytes, you have to check your CSS's size in bytes it might be over 50000 bytes. You can simply paste your CSS and check it's size here, https://mothereff.in/byte-counter. If your CSS exceed 50000 bytes than AMP validator will show error.

Nisarg
  • 367
  • 1
  • 6