Skip to content

After updating to v4 getting an error "Unknown word" when using the @font-face at-rule #16848

Answered by jeknom
jeknom asked this question in Help
Discussion options

You must be logged in to vote

I managed to figure out what causes the issue and created a reproduction repo here:
https://github.com/jeknom/tailwind-v4-unknown-word-repro

So basically we had a couple of places where a developer had tried to set the height of an element dynamically like so:

<div className={`h-[${DYNAMIC_HEIGHT}px]`}>

This combined with having the @font-face at rule in css will throw the error mentioned in my initial message. If I remove rule, everything works, if I remove this dynamic class, everything works. I think the error could be improved to indicate specifically that the dynamic variable is not allowed. It was difficult to find which specific files had this issue.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jeknom
Comment options

Answer selected by jeknom
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