@jambaree/gatsby-theme-tailwindcss

2.1.7 • Public • Published

A Gatsby theme to easily use tailwindcss.

Summary

This theme installs:

Installation

yarn add @jambaree/gatsby-theme-tailwindcss

Usage

Add the newly generated globals.css file to your gatsby-browser

//gatsby-browser.js
import "./src/styles/globals.css"

Theme options

This theme is using gatsby-plugin-postcss under the hood, so you can pass in any options you would to the actual postcss plugin (postCssPlugins and cssLoaderOptions)

NOTE: using a postcss.config.js file is not supported, you have to use the options: {} object of the theme.
Key Default value Description
postCssPlugins [require("tailwindcss")] postcss-plugins to load
cssLoaderOptions {} postcss css loader options
emotionOptions {} emotion babel-plugin-emotion options

With autoprefixer

// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-theme-tailwindcss`,
      options: {
        postCssPlugins: [require("autoprefixer")],
      },
    },
  ],
}

Package Sidebar

Install

npm i @jambaree/gatsby-theme-tailwindcss

Weekly Downloads

1

Version

2.1.7

License

MIT

Unpacked Size

28.1 kB

Total Files

6

Last publish

Collaborators

  • calebbarnes
  • renesauve
  • jam-developer