Renaming gray to grey in Tailwind CSS

In tailwind.config.js:

const { colors } = require('tailwindcss/defaultTheme')

module.exports = {
  purge: ["./public/**/*.html"],
  theme: {
    extend: {
      colors: {
        // Remove the "gray" colours from the theme.
        gray: {},

        // Create a new set of "grey" colours, using the original "gray" values.
        grey: colors['gray']
      }
    },
  },
  variants: {},
  plugins: [],
};

Based on a configuration file from https://github.com/tailwindlabs/tailwindcss-playground.

Was this useful?

Sign up here and get more like this delivered straight to your inbox every day.

About me

Picture of Oliver

I'm an Acquia-certified Drupal Triple Expert with 17 years of experience, an open-source software maintainer and Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.