Title: CSS doesn&#8217;t load
Last modified: July 17, 2018

---

# CSS doesn’t load

 *  Resolved [frankno](https://wordpress.org/support/users/frankno/)
 * (@frankno)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/css-doesnt-load-2/)
 * Hello. I’m using the AMP plugin to build a theme from scratch. I know this is
   not best practice, but I’m trying to learn a little bit.
 * The first issue I encountered is that after activating the AMP plugin, my site
   looks “styleless”.
 * I’ve commited the theme as for now in [this github repository](https://github.com/AeonFr/weblike-wordpress-amp-theme)
   in order to let anyone play with it and see if their result is the same.
 * I’m still gonna try to explain my process:
 * I’ve created a new theme and added a few stuff to functions.php, most notably:
 *     ```
       # add AMP support
       add_theme_support( 'amp' );
   
       /*  ... */
   
       # Register styles
       function weblike_enqueue_styles(){
         wp_enqueue_style( 'teutonic', get_template_directory_uri() . '/css/includes/teutonic.css' );
         wp_enqueue_style( 'weblike', get_template_directory_uri() . '/css/main.css' );
       }
       add_action( 'wp_enqueue_scripts', 'weblike_enqueue_styles' );
   
   
       # Disable admin toolbar
       add_filter('show_admin_bar', '__return_false');
       ```
   
 * I’ve registered two stylesheets: the [teutonic CSS](https://teutonic.co) and 
   a main stylesheet with very little code (only one CSS class).
 * Note: This issue still holds after disabling teutonic. My first though is that
   teutonic was including some unsupported AMP features (it has a lot of css variables
   and all text sizes are `calc()`‘d).
 * Now after doing this, my header.php looks like this (the head tag is almost exactly
   as the one in this theme I’m using as a guide: [ampnews/header.php](https://github.com/xwp/ampnews/blob/develop/header.php)).
 * This should make my site AMP right away… right? (That’s what I understand the
   plugin does… at least)
 * Yet…
    – the styles are disabled completely in my site. – the most familiar thing
   with an inline style is this piece of code: `<noscript><style amp-boilerplate
   >body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:
   none}</style></noscript>` and this one `<style amp-custom></style>` (an empty
   script tag) – there are no `style=""` attributes – of course, all styles appear
   inmediately after disabling the plugin
 * I would post a screenshot but I’m too lazy to upload it to an external web service:
   sorry:
    -  This topic was modified 7 years, 10 months ago by [frankno](https://wordpress.org/support/users/frankno/).
    -  This topic was modified 7 years, 10 months ago by [frankno](https://wordpress.org/support/users/frankno/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcss-doesnt-load-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/css-doesnt-load-2/#post-10515216)
 * Hi [@frankno](https://wordpress.org/support/users/frankno/),
    Wow, that’s great
   that you’re creating a Native AMP theme.
 * When using your theme, I also saw that the styling didn’t appear:
    [⌊No styling weblike⌉](https://cloudup.com/cTZLFtRLbPf)
 * But when using the upcoming AMP plugin version `1.0` of this plugin, it looked
   like there was some styling:
 * [⌊Weblike amp plugin⌉⌊Weblike amp plugin⌉[
    [https://github.com/Automattic/amp-wp#10-unreleased](https://github.com/Automattic/amp-wp#10-unreleased)
 * Version `1.0` handles styling better, and it has tree-shaking to try to avoid
   stripping styling that’s over the 50 KB limit.
 * Version 1.0 isn’t yet ready for production. In the meantime, you might try enqueuing
   the CSS, instead of using the `@import`. But I’m not sure if that’ll fix it.
 *  Thread Starter [frankno](https://wordpress.org/support/users/frankno/)
 * (@frankno)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/css-doesnt-load-2/#post-10516491)
 * Thanks [@ryankienstra](https://wordpress.org/support/users/ryankienstra/). Indeed,
   the webpage I was working on had only a few basic styles. So with the new version
   of the AMP plug-in, the styles look exactly as they’re supposed to look… Yay!
 * This is exiting, it talks great about the plug-in that it can handle complex 
   stylesheets with lots of –vars and calc()s.
 * Thanks ☺
 *  Thread Starter [frankno](https://wordpress.org/support/users/frankno/)
 * (@frankno)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/css-doesnt-load-2/#post-10520039)
 * Hi, I was trying the new plug-in version just now (I hadn’t had the time earlier),
   and even with the new 1.0 version, my site doesn’t load with any CSS at all. 
   I’ve also tried with other themes, like Twenty Fifteen, Twenty Seventeen… And
   there’s no CSS either.
 * Like before, the source code of my site shows an empty `<style amp-custom="">
   </style>` tag
 * This is the screen that show the current version of the plug-in
 * > [View post on imgur.com](https://imgur.com/Lri4j11)
 * 
 * **Edit**: I deleted the previous persion of the plug-in, downloaded the code 
   from GitHub’s dev branch and run `composer install`. If you need any reference
   of my set-up, I might possibly update the SQL database export file somewhere?
   May that be useful?
    -  This reply was modified 7 years, 10 months ago by [frankno](https://wordpress.org/support/users/frankno/).
      Reason: Base64 images are not supported
    -  This reply was modified 7 years, 10 months ago by [frankno](https://wordpress.org/support/users/frankno/).

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

The topic ‘CSS doesn’t load’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [frankno](https://wordpress.org/support/users/frankno/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/css-doesnt-load-2/#post-10520039)
 * Status: resolved