...

/

Customizing and Configuration File Basics

Customizing and Configuration File Basics

Learn how to customize Tailwind by using the configuration file.

Reasons for customizing Tailwind

Tailwind is an engine that generates a lot of CSS classes, and this engine has a lot of hooks that allow us to alter the set of utilities available to us.

We might want to customize Tailwind for several reasons:

  • Change defaults: Tailwind provides default step values for most of its utilities—for example, the common steps for margins, padding, and other spacing items. It has default screen sizes for responsive breakpoints. Tailwind also provides a default set of colors, but we may want to add our own. In the configuration file, we can change these.

  • Change the set of classes: Tailwind generates a lot of CSS classes. For file size purposes, we might want to reduce that list— for example, if we know we are not using flexbox, we can tell Tailwind not to generate any flexbox-related utilities. Conversely, Tailwind offers ...