Tailwind remove default style for link, I try to add underline to all links.
I tried
@layer base {
a {
@apply underline;
}
But I have no idea where to put the code, I tried inside style tag in my layout blade html file, but its not working.
I tried
<style>
ul-link{
@apply underline;
}
</style>
...
<div class="ul-link">Test</div>
This not working either, no underline.
but like this working
<div class="underline">Test</div>
What am I missing? Why is @apply not working? and How do I create global style?
@layer ...code should be in yourresources/css/app.cssfile below the tailwind imports. Run againnpm run devto update the compiled css and it should work.