Skip to content

Commit b74160a

Browse files
committed
Fix variant completion validation when prefixes are used
1 parent 4669ee4 commit b74160a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: packages/tailwindcss-language-service/src/util/getVariantsFromClassName.ts

+6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ export function getVariantsFromClassName(
3333
// NOTE: This should never happen
3434
if (!state.designSystem) return false
3535

36+
let prefix = state.designSystem.theme.prefix ?? ''
37+
38+
if (prefix !== '') {
39+
className = `${prefix}:${className}`
40+
}
41+
3642
// We don't use `compile()` so there's no overhead from PostCSS
3743
let compiled = state.designSystem.candidatesToCss([className])
3844

0 commit comments

Comments
 (0)