Skip to content

Custom background color not working in lastest version 4.1.3 #17653

Closed Answered by wongjn
lumixraku asked this question in Help
Discussion options

You must be logged in to vote

You're using v4, which doesn't automatically use the tailwind.config.js file. Since the tailwind.config.js is considered legacy, consider configuring Tailwind in the CSS file. Thus, add in src/index.css (or src/variable.css since that is @imported by src/index.css):

@theme {
  --color-my-custom-bg: green;
  /* Or */
  --background-color-my-custom-bg: green;
}

Replies: 1 comment 1 reply

Comment options

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

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