Skip to content

Replicate Tailwind link styling using Tailwind #4209

Discussion options

You must be logged in to vote

What I can see these functions are not built into Tailwind yet.

https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-color

If you want to add them yourself you can do that in your tailwind.css class.

@tailwind base;
@tailwind components;

.decoration-red-500 {
  text-decoration-color: red !important;
}

@tailwind utilities;
<a href="#" class="underline decoration-red-500">My link</a>

There is probably a better way to do it but this is quick.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by evelynccordner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants