tailwindcss-jit-cdn
tailwindcss-jit-cdn copied to clipboard
does @apply work?
Hi Marcel et al, I tried using @apply within a css file and it had no effect. Is @apply catered for? https://codepen.io/jayenne/pen/BaWryVG
I was specifically hoping to use it within codepen to really help my pen: https://codepen.io/jayenne/pen/GRWxgqO to display like my play.tailwindcss: https://play.tailwindcss.com/8gfgRpSQuw?file=config
Hey,
It doesn't work with external stylesheets, but you can add an inline style tag with the type set to "postcss":
<script src="https://unpkg.com/tailwindcss-jit-cdn"></script>
<style type="postcss">
.foo {
@apply bg-green-500 h-64 w-64 rounded-full;
}
</style>
<div class="p-16">
<div class="foo"></div>
</div>
Thanks very much for this Marcel,
*I had tried this before posting but without the type