Skip to content

Upgrade to v4 doesn't work: Cannot apply unknown utility class: bg-opacity-50 #18054

Answered by philipp-spiess
alexkiro asked this question in Help
Discussion options

You must be logged in to vote

Ohh I'm stupid, of course bg-opacity-50 doesn't work: We removed it! 🤦 https://tailwindcss.com/docs/upgrade-guide#removed-deprecated-utilities unfortunately the upgrade tool does not handle that specific case because in order to fix this it would need to set a bg color value too but it only looks at one class in isolation. You'll have to figure out what color is set here and then use bg-{color}/50

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@alexkiro
Comment options

@philipp-spiess
Comment options

@alexkiro
Comment options

@philipp-spiess
Comment options

Answer selected by alexkiro
@alexkiro
Comment options

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
Converted from issue

This discussion was converted from issue #18053 on May 16, 2025 09:22.