Skip to content

Using daisyUI from- and to- colours for Tailwind Background Clip #379

Answered by saadeghi
spences10 asked this question in Q&A
Discussion options

You must be logged in to vote

Here's an example: https://play.tailwindcss.com/HPfZEywPIX

<div class="text-5xl font-extrabold">
  <span class="bg-clip-text text-transparent bg-gradient-to-r from-primary to-secondary">
    Hello world
  </span>
</div>

from- utility class only takes the color name. And primary is the purple (default theme) color. primary-content is the white color for the content to be used on primary color.
so you should be using from-primary instead of from-text-primary-content
and to-secondary instead of to-text-secondary-content

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@spences10
Comment options

Answer selected by spences10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants