Skip to content

There is a default Background Class for all themes. #562

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

You must be logged in to vote

You can use any color but bg-base-100 would be the best choice. If you're nesting themes you will also need to set the text color otherwise it will inherit from the parent.

So this would be the safest option for nesting themes inside each other:

<div class="bg-base-100 text-base-content" data-theme=dark>
  <div class="bg-base-100 text-base-content" data-theme=light>
    <div class="bg-base-100 text-base-content" data-theme=night>
    </div>
  </div>
</div>

Replies: 1 comment 1 reply

Comment options

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

Answer selected by jjdevzinho
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