importing and inlining global.css with set:html (#2601)

This commit is contained in:
Tony Sullivan 2022-02-17 12:39:55 +00:00 committed by GitHub
parent c496ac8dad
commit 934d9750cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,8 @@
---
// Component Imports
import Button from '../components/Button.astro';
// Imports the global styles to be inlined in the <head>
import styles from '../styles/global.css';
// Full Astro Component Syntax:
// https://docs.astro.build/core-concepts/astro-components/
@ -11,9 +13,7 @@ import Button from '../components/Button.astro';
<meta charset="UTF-8" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<title>Astro + TailwindCSS</title>
<style global>
@import "../styles/global.css";
</style>
<style set:html={styles}></style>
</head>
<body>