Jump to the navigation menu

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 interesting?

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

About me

Picture of Oliver

I'm an certified Drupal Triple Expert with 18 years of experience, a Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.