@_tw/themejson 中文文档教程
_tw × theme.json
一个自动从 WordPress 主题的 theme.json 文件中提取颜色和宽度的 Tailwind CSS 插件,启动如下:
// tailwind.config.js
plugins: [
require( '@_tw/themejson' )( require( 'path/to/theme.json' ) ),
]
这将提取基本调色板 (settings.color.palette
) 以及 < code>contentSize 和 wideSize
。
_tw × theme.json
A Tailwind CSS plugin that automatically pulls colors and widths from a WordPress theme’s theme.json file, initiated as follows:
// tailwind.config.js
plugins: [
require( '@_tw/themejson' )( require( 'path/to/theme.json' ) ),
]
This will extract the base colour palette (settings.color.palette
) as well as values for contentSize
and wideSize
.