Skip to content

How to show light mode and dark mode logo? #2493

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

You must be logged in to vote

You can use a class name like this:

[[data-theme=dark]_&]:hidden

Since daisyUI theme is defined like <html data-theme="dark">, [[data-theme=dark]_&]:hidden class hides the element if the parent has data-theme="dark".

Example:
https://play.tailwindcss.com/32M1pqHLPt

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by saadeghi
Comment options

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

Comment options

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

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants