improve: set theme.json colors in tailwind conf

This commit is contained in:
Kelly Mears
2022-03-04 22:25:23 -08:00
committed by Ben Word
parent 7332184315
commit 972f4cd55c
3 changed files with 42 additions and 11 deletions

View File

@@ -39,5 +39,36 @@ export default async (app) => {
/**
* URI of the `public` directory
*/
.setPublicPath("/app/themes/sage/public/");
.setPublicPath("/app/themes/sage/public/")
/**
* Generate WordPress `theme.json`
*
* @note This overwrites `theme.json` on every build.
*/
.themeJson({
color: {
custom: false,
customGradient: false,
},
custom: {
spacing: {},
typography: {
'font-size': {},
'line-height': {},
},
},
spacing: {
padding: true,
units: ['px', '%', 'em', 'rem', 'vw', 'vh'],
},
typography: {
customFontSize: false,
},
})
/**
* Set `theme.json` colors from `tailwind.config.js` values
*/
.useTailwindColors();
};