Skip to content

[v4] Modifiers are not working with custom utilities #15066

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

You must be logged in to vote

@b-meyer Hey! This is because you're using the v3 API for defining custom utilities. We have removed this as part of the v4 breaking changes since it clashes with CSS native @layer now. Instead, what you want want to do now is:

@utility bold {
  @apply font-bold;
}

https://play.tailwindcss.com/RO5XMteTaT?file=css

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@b-meyer
Comment options

@philipp-spiess
Comment options

@philipp-spiess
Comment options

Answer selected by b-meyer
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 #15065 on November 21, 2024 15:44.