rails / tailwindcss-rails

MIT License
1.39k stars 171 forks source link

Classes not loaded while building #330

Closed Jules-Pinsard closed 8 months ago

Jules-Pinsard commented 8 months ago

Hi !

I've been facing an issue while running with Tailwind lately, some classes are not loaded properly (and sometimes appear after several reload of the page). For example this is how the exact same code is rendered on my server and on Tailwind Play. Screenshot 2024-02-08 at 14-55-34 TestTemplate Screenshot 2024-02-08 at 14-57-12 Tailwind Play

This is a test project I just made so the configuration is the basic one :

const defaultTheme = require('tailwindcss/defaultTheme')

module.exports = {
  content: [
    './public/*.html',
    './app/helpers/**/*.rb',
    './app/javascript/**/*.js',
    './app/views/**/*.{erb,haml,html,slim}'
  ],
  theme: {
    extend: {
      fontFamily: {
        sans: ['Inter var', ...defaultTheme.fontFamily.sans],
      },
    },
  },
  plugins: [
    require('@tailwindcss/forms'),
    require('@tailwindcss/aspect-ratio'),
    require('@tailwindcss/typography'),
    require('@tailwindcss/container-queries'),
  ]
}

I tried to run my server with the three Live rebuild method described in the documentation and I'm facing the same issue. What should I do to get a proper building of my page ?

Thanks 😃