Ahmad Shiddiq
Ahmad Shiddiq

Reputation: 439

Set default color for text in Tailwind

What is the correct way to assign default values to all text on the website using Tailwind CSS?

Is there a setting in tailwind.config.js for that?

Upvotes: 4

Views: 5701

Answers (1)

kissu
kissu

Reputation: 46814

You cannot directly do that in tailwind, meanwhile you can set the text to use a specific color globally with something like

* {
  @apply text-blue-500; // can also customize it to have a `text-primary-500`
}

And customize the blue color values to your liking: https://tailwindcss.com/docs/customizing-colors#curating-colors

Upvotes: 3

Related Questions