Title: CSS doesn&#8217;t generate
Last modified: June 3, 2020

---

# CSS doesn’t generate

 *  Resolved [cosmins](https://wordpress.org/support/users/cosmins/)
 * (@cosmins)
 * [6 years ago](https://wordpress.org/support/topic/css-doesnt-generate/)
 * Hi guys,
    All of a sudden, CSS doesn’t seem to be generated anymore inside the
   <amp-custom> tag, cleared all cache & transients. We do have also a staging environment
   with the same setup – same plugins (& versions), same theme and there everything
   is working properly.
 * What could be the cause? What should I be looking into? Please help.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcss-doesnt-generate%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years ago](https://wordpress.org/support/topic/css-doesnt-generate/#post-12932752)
 * Are there any validation errors showing up when you click “Validate” under the
   AMP admin bar item? It may be due to having excessive CSS?
 *  [selu](https://wordpress.org/support/users/marius2012/)
 * (@marius2012)
 * [6 years ago](https://wordpress.org/support/topic/css-doesnt-generate/#post-12934153)
 * Hey [@westonruter](https://wordpress.org/support/users/westonruter/),
 * I’m following up on the same site which my colleague reported.
    It’s some kind
   of inconsistency:
 * Viewing the AMP page, [https://www.codeinwp.com/blog/?amp](https://www.codeinwp.com/blog/?amp),
   I see the CSS usage at 1% -> [https://share.getcloudapp.com/L1upGm57](https://share.getcloudapp.com/L1upGm57)
   but when reviewing the validation details for that page, I see `Total CSS size
   after minification: 41,922 B` -> [https://share.getcloudapp.com/8Lu7G8wN](https://share.getcloudapp.com/8Lu7G8wN)
 * Any idea what could be causing this discrepancy?
 * We are not using Object Cache, the generated CSS is stored in transients.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years ago](https://wordpress.org/support/topic/css-doesnt-generate/#post-12934389)
 * Please share your Site Health info. Perhaps there is a plugin conflict?
 *  [selu](https://wordpress.org/support/users/marius2012/)
 * (@marius2012)
 * [6 years ago](https://wordpress.org/support/topic/css-doesnt-generate/#post-12934482)
 * Hi,
 * I’ve attached the health info
 * [https://gist.github.com/selul/7659e846243552f4b4f58089f878d860](https://gist.github.com/selul/7659e846243552f4b4f58089f878d860)
 * We haven’t been able to isolate any conflict!
    Except for transients, is there
   any other place that could store the CSS generated?
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years ago](https://wordpress.org/support/topic/css-doesnt-generate/#post-12934509)
 * That’s strange. Are there any validation errors being reported for the CSS? You
   shared a screenshot of the stylesheet summary, but what about the table above?
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years ago](https://wordpress.org/support/topic/css-doesnt-generate/#post-12934557)
 * I bet you have a CSS rule that contains `i-amphtml-` somewhere.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years ago](https://wordpress.org/support/topic/css-doesnt-generate/#post-12934919)
 * Actually, if that were the case then I’d expect the `style[amp-custom]` element
   to be removed entirely. See [https://github.com/ampproject/amp-wp/issues/771](https://github.com/ampproject/amp-wp/issues/771)
 * For some reason it seems the stylesheets loaded via in `link` elements are getting
   dropped, but I don’t know why would be.
 * Examining any validation errors that are being reported above the stylesheets
   metabox is the next place to look.
 *  [selu](https://wordpress.org/support/users/marius2012/)
 * (@marius2012)
 * [6 years ago](https://wordpress.org/support/topic/css-doesnt-generate/#post-12936279)
 * Hi [@westonruter](https://wordpress.org/support/users/westonruter/),
 * All the validation errors reported by AMP on that page are JS related which has
   the markup status `Removed`, nothing related to the CSS.
 * Any idea what could prevent the fetching of the external CSS files?
 *  [selu](https://wordpress.org/support/users/marius2012/)
 * (@marius2012)
 * [6 years ago](https://wordpress.org/support/topic/css-doesnt-generate/#post-12936516)
 * Hi [@westonruter](https://wordpress.org/support/users/westonruter/),
 * I’m following up on this issue, it seems it was a CDN compatibility issue.
 * Right now everything is ok.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years ago](https://wordpress.org/support/topic/css-doesnt-generate/#post-12939027)
 * Please share the details about what the CDN compatibility issue was so that others
   in the future can benefit.
 *  [selu](https://wordpress.org/support/users/marius2012/)
 * (@marius2012)
 * [6 years ago](https://wordpress.org/support/topic/css-doesnt-generate/#post-12940436)
 * Hi [@westonruter](https://wordpress.org/support/users/westonruter/),
 * I wish I could but I’m not sure what was causing this and the hosting company
   that we use doesn’t offer too many details around this. Basically this is their
   answer:
 *     ```
       We are aware that there are at times issues with our CDN, and have included a note about when you go to activate it:
       Kinsta CDN may not be 100% compatible with multisites and custom setups.
       There are often cases (due to a customized setup) where it is necessary to disable/re-enable the CDN cache to fix certain layout issues
       ```
   
 * Based on your feedback regarding a possible issue with fetching of the external
   CSS styles, I have reported that would be an issue with the CDN and they have
   recreated the CDN distribution which magically fixed the problem.
 * I hope this helps!

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘CSS doesn’t generate’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [selu](https://wordpress.org/support/users/marius2012/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/css-doesnt-generate/#post-12940436)
 * Status: resolved