Search code examples
amp-html

How to include CSS file in AMP project


<style amp-custom>
{% include "style.css" %}
</style>

I am trying to create a simple AMP-site and got some problem. What is {% %}? It doesn't work for me?


Solution

  • You can’t reference external stylesheets amp pages, styles must be inlined under style tag with amp-custom attribute

    <style amp-custom>
    
    </style>
    

    reference: amp styling doc