mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Add more detail to @apply errors
This commit is contained in:
parent
0751431658
commit
7d6d0af65c
@ -24,7 +24,7 @@ function findMixin(css, mixin, onError) {
|
||||
|
||||
if (_.isEmpty(matches)) {
|
||||
// prettier-ignore
|
||||
onError(`\`@apply\` cannot be used with ${mixin} because ${mixin} either does not exist, or it's actual definition includes a pseudo-class like :hover, :active, etc.`)
|
||||
onError(`\`@apply\` cannot be used with \`${mixin}\` because \`${mixin}\` either cannot be found, or it's actual definition includes a pseudo-selector like :hover, :active, etc. If you're sure that \`${mixin}\` exists, make sure that any \`@import\` statements are being properly processed *before* Tailwind CSS sees your CSS, as \`@apply\` can only be used for classes in the same CSS tree.`)
|
||||
}
|
||||
|
||||
if (matches.length > 1) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user