• Resolved cosmins

    (@cosmins)


    Hey guys, what could be the reason for not getting that error regarding excessive CSS, I used to find that usually in the <head> – ‘the following stylesheets are too large to be included in style[amp-custom]’ + a lot of info on what has been excluded/included.

    The problem is that I have a bunch of elements that don’t get to be styled, the styling for them is definitely not in <amp-custom> but there’s no error.

    Any hints?

    p.s.: using WP 5.2.4, AMP v1.3.0 + custom theme

    • This topic was modified 5 years, 4 months ago by cosmins.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Pascal Birchler

    (@swissspidy)

    Hi @cosmins

    We realized that this debug comment in the head could become quite large. That’s why we now only show it when either WP_DEBUG is set or when there was effectively excessive CSS (> 50 KB).

    In your case it seems like there is no excessive CSS, but the CSS has been removed as it was deemed to be unused on the page. Perhaps that was a false positive.

    I suggest turning on WP_DEBUG to investigate this, and if that doesn’t help, please share your markup + expected CSS here.

    Note: We’ve also made a bunch of changes to CSS handling in the upcoming 1.4.0 release, so you might want to give the current beta a try. You can download it here: https://github.com/ampproject/amp-wp/releases/tag/1.4.0-beta1

    Thread Starter cosmins

    (@cosmins)

    big thanks @swissspidy , turned WP_DEBUG on and I can see now what’s been excluded. I’ll go ahead and try also the 1.4.0-beta1, maybe it shakes the tree better ??

    Thanks again and best of luck with this awesome plugin!

    Plugin Author Pascal Birchler

    (@swissspidy)

    Excellent!

    Please let us know how 1.4.0 Beta works for you. We’ll be releasing a release candidate version hopefully soon.

    PS. We’re always happy about a nice plugin review ??

    Plugin Author Weston Ruter

    (@westonruter)

    @cosmins It would be helpful to list out the HTML comment that appears before the <style amp-custom>. That will detail how effective the CSS tree shaker is and what stylesheets are particularly problematic.

    The plugin will be improving the presentation of this information once this is resolved: https://github.com/ampproject/amp-wp/issues/2169

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘CSS stripped down – no errors’ is closed to new replies.