Search code examples
csspluginscss-gridtailwind-css

Tailwind Grid Plugin Not Installing


I'm new to Tailwind CSS and I'm having some trouble trying to implement the CSS Grid Plugin available here: https://www.npmjs.com/package/tailwindcss-grid

I was able to run the install through Gulp and get the package in place. It is sitting in my node-modules folder. I then tried adding the plugin to my plugins code block in the tailwind.js file:

plugins: [
require('tailwindcss/plugins/container')({
  // center: true,
  // padding: '1rem',
}),
require('tailwindcss-grid/index.js')({
    grids: [12],
    gaps: {
        0: '0'
    },
    variants: ['responsive'],
}),
require('tailwindcss-object-fit/index.js')(['responsive']),
require('tailwindcss-object-position/index.js')(['responsive'])
],

When I make changes to my css and tailwind processes the css file, it doesn't return any errors, but when I look at the CSS output, none of the utilities for the CSS frid or the object fit and position plugins are being output to the file. Like I said, I'm new to Tailwind, so can anyone tell me what I'm missing? I'm not what I'm doing wrong with the plugin import.


Solution

  • Nevermind. I sorted it out. I don't think it had actually processed the style sheet yet. The styles are there now though.