🚧 theme.json generator updates

This commit is contained in:
Ben Word
2022-09-23 15:49:21 -05:00
parent fb8de9a301
commit a2bd26a4af
2 changed files with 38 additions and 35 deletions

View File

@@ -46,31 +46,31 @@ export default async (app) => {
*
* @note This overwrites `theme.json` on every build.
*/
.themeJson({
color: {
custom: false,
customGradient: false,
defaultPalette: false,
defaultGradients: false,
},
custom: {
spacing: {},
typography: {
'font-size': {},
'line-height': {},
.wpjson
.useTailwindColors()
.useTailwindFontFamily()
.useTailwindFontSize()
.settings({
color: {
custom: false,
customGradient: false,
defaultPalette: false,
defaultGradients: false,
},
},
spacing: {
padding: true,
units: ['px', '%', 'em', 'rem', 'vw', 'vh'],
},
typography: {
customFontSize: false,
},
})
/**
* Set `theme.json` colors from `tailwind.config.js` values
*/
.useTailwindColors();
custom: {
spacing: {},
typography: {
'font-size': {},
'line-height': {},
},
},
spacing: {
padding: true,
units: ['px', '%', 'em', 'rem', 'vw', 'vh'],
},
typography: {
customFontSize: false,
},
})
.enable()
};

View File

@@ -1,17 +1,13 @@
{
"__generated__": "⚠️ This file is generated. Do not edit.",
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"settings": {
"color": {
"custom": false,
"customGradient": false,
"palette": [
{
"name": "Primary",
"slug": "primary",
"color": "#525ddc"
}
]
"defaultPalette": false,
"defaultGradients": false
},
"custom": {
"spacing": {},
@@ -22,10 +18,17 @@
},
"spacing": {
"padding": true,
"units": ["px", "%", "em", "rem", "vw", "vh"]
"units": [
"px",
"%",
"em",
"rem",
"vw",
"vh"
]
},
"typography": {
"customFontSize": false
}
}
}
}