Customize background image on theme for tailwind v4 #13756
-
Hi team I'm using tailwind 4 on a new project, and before migrating to it I was using version 3. On backgroundImage: {
'participant-overlay': 'linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.64))',
}, Is it possible to accomplish the same by defining this inside the Based on this section of the docs:
I left the I'm using |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
You'd define @import "tailwindcss";
@theme {
--background-image-participant-overlay: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.64));
} |
Beta Was this translation helpful? Give feedback.
-
Hey. How can we add a background-size into the theme. I have of this way but it does not work!
In my component
It does not work here However the background image do work. I am confused |
Beta Was this translation helpful? Give feedback.
You'd define
background-image
values in@theme
in the format--background-image-<key>: <value>
like:See this Tailwind Play of this working.