Tailwind CSS Config

Maizzle comes with an email-tailored Tailwind CSS config.

Spacing units

Because they are poorly supported in email, rem units have been replaced with px ones, with values better suited for email client viewports.


The important option needs to be true, in order for the responsive utilities to actually override inlined CSS.

// tailwind.config.js
module.exports = {
  important: true,
  // ...


⚡4email doesn't support inline CSS, so there's no reason to enable !important.

Use the tailwind.config option to define a path to a custom Tailwind CSS config file, where you disable the option:

// config.amp.js
build : {
  tailwind: {
    css: 'src/assets/css/main.css',
    config: 'tailwind.amp.js',

// tailwind.amp.js
module.exports = {
  important: false,
  // ...


Separators like : in hover:bg-black or / in w-1/2 need to be escaped in CSS. Unfortunately, some email clients - Gmail, most notably - fail to parse selectors with escaped characters.

Therefore, both : and / have been replaced with - in Maizzle.

// tailwind.config.js
module.exports = {
  separator: '-',
  // ...


A custom set of @media query breakpoints is defined.

Maizzle uses a desktop-first approach with max-width, instead of Tailwind's default mobile-first with min-width. Of course, you're free to adjust these as you like:

screens: {
  all: {'raw': 'screen'},
  xs: {'max': '480px'},
  sm: {'max': '600px'},
  • all

    This creates an @media screen {} query. All its utility classes are prefixed with all- - you can use it for things like:

    • defining (web) font stacks for modern email clients
    • preventing Juice from inlining a utility class
  • xs

    Most smartphone viewports currently fit within this breakpoint.

  • sm

    Breakpoint to mark the most common email width boundary.

More on screens, in the Tailwind CSS docs ↗


Maizzle comes with the tailwindcss-gradients plugin. See the Gradients docs for examples showing how to configure and use it.

Of course, you can add any plugin you want, like CSS grid or border image gradients.