79526942

Date: 2025-03-22 04:35:31
Score: 1
Natty:
Report link

This is ancient history at this point, but for anyone else who finds this at the top of Google (like I did) I'm almost certain this is because Tailwind isn't observing your markdown files for classes.

Tailwind automatically scans the file paths specified in your tailwind.config.js and only includes the utility classes that are being used in those files in the resulting bundle. I nearly went mad with a similar issue trying to dynamically render tailwind utility classes based on values from a headless CMS. Suffice to say, it's not meant to be used that way.

Posting in the hope that this saves someone the headache I had as it didn't feel obvious at the time.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Reuben Hawthorne-Jensen