css
Tailwind @apply directive not working
@apply.*not.*working|Cannot apply.*unknown utility|@apply.*error
Fixes
- 1.Ensure the class being applied exists in Tailwind's utility set or is defined in the config
- 2.@apply cannot use classes with modifiers like hover: or responsive prefixes — apply the base class and add the variant separately
- 3.Check that PostCSS is processing the file — @apply only works in files processed by Tailwind's PostCSS plugin
tailwind@applypostcss
Related Errors
css3 fixes
Container queries not supported
@container.*not.*supported|container-type.*unknown
- •Add container-type: inline-size to parent
- •Check browser version supports container queries
css3 fixes
Container query: Invalid container name
container-name.*must be.*ident
- •Use valid CSS identifier for container-name
- •Don't use CSS keywords as container names
css3 fixes
Container query: No matching container ancestor
@container.*no.*ancestor.*container
- •Add container-type to an ancestor element
- •Check container-name matches query