0

I have about 7 different repos which all have there own tailwind setup (EG 7 different repos with 7 different versions of the same button) so I have created a private repo to remove this duplication but I'm having issues with classes not being applied.

I have an issue were only the classes used in the website are applied to the components. EG My page uses mr-8, my button is using mr-8 and px-2.5 but the button only has the mr-8 class applied.

I have this in my purge content: '.node-modules/\\@my-name/react-tailwindui/lib/**/*.{ts,tsx}'

This is an example of my button.

<button type="submit" class="inline-flex justify-center items-center border font-medium 
rounded focus:outline-none focus:ring-2 focus:ring-opacity-30 text-xs p-2.5 border-transparent 
dark:border-gray-500 text-white hover:bg-primary-700 focus:ring-primary-00 bg-primary-600 
shadow-sm rounded-full mr-8">Sign in</button>

These are the classes applied

Example of classes applied

Thanks Kurtis

Kurtis
  • 1,172
  • 2
  • 12
  • 20

1 Answers1

0

Check your tailwindcss version, p-2.5 only exists in v2.x

hulufei
  • 737
  • 1
  • 6
  • 17
  • I doubled checked anyway but the classes work if I put them into the site I'm building, the issue is when the classes are in the internal repo only and not any of the pages. Thanks. – Kurtis Sep 13 '21 at 09:12