Skip to content

Customize background image on theme for tailwind v4 #13756

Answered by wongjn
Nilomiranda asked this question in Help
Discussion options

You must be logged in to vote

You'd define background-image values in @theme in the format --background-image-<key>: <value> like:

@import "tailwindcss";

@theme {
  --background-image-participant-overlay: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.64));
}

See this Tailwind Play of this working.

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@Nilomiranda
Comment options

@Nilomiranda
Comment options

@hugoed31
Comment options

@wongjn
Comment options

wongjn Mar 7, 2025
Collaborator

Answer selected by Nilomiranda
Comment options

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

wongjn Mar 7, 2025
Collaborator

Comment options

You must be logged in to vote
2 replies
@wongjn
Comment options

wongjn Jul 21, 2025
Collaborator

@J4ngel
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants