Automatically Generating theme.json
from a Tailwind Config
Ben Word on
theme.json
in Sage 10 is now generated automatically during the build process and configures the editor to use Tailwind’s colors, sizes, and font families.
Default color palette
Rather than manually defining the the editor colors in your Sage-based WordPress themes by adding them theme.json
, your color palette as defined by your Tailwind config will be used by default for the WordPress editor.
Tailwind’s default color palette is a good starting point for sites that don’t already have color/branding guidelines to follow.
Sizes and font families
In addition to including Tailwind’s color palette for the WordPress editor, Sage will also configure the editor with Tailwind’s font families and font sizes.
Be sure to take a look at both Bud’s documentation on this feature and Sage’s Tailwind CSS docs for further information.