Skip to content

bg-opacity doesn't work on dark mode #13703

Answered by adamwathan
exxsy asked this question in Help
Discussion options

You must be logged in to vote

Hey! When you override a color in dark mode the opacity is reset, so you need to specify the opacity for dark mode too 👍🏻

https://play.tailwindcss.com/a9R30WT8Pc

I'd recommend using the opacity modifier syntax instead though — we consider the bg-opacity-* utilities deprecated, they haven't been documented since v2 and will be removed in v4:

https://play.tailwindcss.com/YW6NLfR1hL

Replies: 2 comments 1 reply

Comment options

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

Answer selected by exxsy
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
3 participants
Converted from issue

This discussion was converted from issue #13702 on May 18, 2024 14:06.