Skip to content

dark: not working in @apply (tailwind 2.0.1) #2917

Answered by simonswiss
bhatsudo asked this question in Help
Discussion options

You must be logged in to vote

Hey! 👋

Are you sure that the dark class is being applied on a parent element with your custom button implementation? Because what you're describing should definitely work. 👍

Here's a Tailwind Play example that shows both the text-gray-800 and text-gray-200 styling based on a parent wrapper with a dark class:

https://play.tailwindcss.com/RpfeDooXVs

Hope it helps you troubleshoot!

Replies: 26 comments 33 replies

Comment options

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

@shuangbofu
Comment options

Answer selected by bhatsudo
Comment options

You must be logged in to vote
7 replies
@Jak3b0
Comment options

@ncovercash
Comment options

@tim-corley
Comment options

@felixbeer
Comment options

@Rgeelen
Comment options

Comment options

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

Comment options

You must be logged in to vote
3 replies
@adharshmk96
Comment options

@fredericrous
Comment options

@njarraud
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@jessycormier
Comment options

@asif-mahmud
Comment options

@felixcatto
Comment options

Comment options

You must be logged in to vote
1 reply
@asif-mahmud
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@tqwewe
Comment options

@justingolden21
Comment options

@syedgufran1997
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@ankitsinghvisionias
Comment options

@maxkrv
Comment options

@fjcero
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@haneulcho
Comment options

@rafaelpoa
Comment options

@oroalej
Comment options

@luisfrocha
Comment options

@Filigs
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

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

Comment options

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

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@imprisonedmind
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
Help
Labels
None yet