3 ms·
If I wanted to change all links from gray to blue/underlined, the best practice there would probably be to use a different utility class (text-blue-500 and unde
by mike1o1 7y ago
If I wanted to change all links from gray to blue/underlined, the best practice there would probably be to use a different utility class (text-blue-500 and underline) and update my templates/partials/whatever.
I think for your specific example, I would use the `@apply` directive to apply certain utilities to all links.
I've used Tailwind on large, complex apps with around 50 screens (so far), and using extracted components or partials hasn't been a problem at all with keeping things in sync.
```
a {
@apply text-gray-700;
}
// now becomes
a {
@apply text-blue-500 underline;
}
```
The documentation goes over this pretty well, I think.
https://tailwindcss.com/docs/extracting-components#extracting-css-components-with-apply https://tailwindcss.com/docs/extracting-components#extractin...
- saagarjha 7y agoWhat if I had two types of links, both of which were currently "text-blue-500 and underline" but I wanted to make one italics at some time in the future?