Skip to content

Instantly share code, notes, and snippets.

@dsebastien
Last active October 17, 2021 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsebastien/763222aeaf49b4caaea671d368d0e25a to your computer and use it in GitHub Desktop.
Save dsebastien/763222aeaf49b4caaea671d368d0e25a to your computer and use it in GitHub Desktop.
Using Tailwind
<script lang="ts">
import Tailwind from "./Tailwind.svelte";
export let name: string;
</script>
<Tailwind />
<style lang="postcss">
:global {
body {
@apply h-full min-h-full bg-gray-800;
}
h1 {
@apply bg-pink-500 text-gray-100 font-bold text-xl rounded-lg px-5;
}
}
.example {
@apply mt-4 text-red-500 text-5xl font-bold;
}
</style>
<main>
<h1>Hello {name} from the <span class="text-7xl">Svelte</span> Tailwind Nx template!</h1>
<div>
<span class="example">Example goes here</span>
</div>
</main>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment