Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 554 Bytes

styling.md

File metadata and controls

27 lines (22 loc) · 554 Bytes

Styling

amp-module adds a custom class to body tag of page, you may use __amp class to target elements only in AMP pages.

.__amp .my-awesome-element {

}

However we recommend to create a separate style file for AMP pages and import it in AMP layout, also remove styles from nuxt.config and import those files in default layout instead.

// default.vue
...
<style>
@import "~/assets/styles/default.css"
</style>

And AMP layout

// default.amp.vue
...
<style>
@import "~/assets/styles/default.amp.css"
</style>