postcss-import-json:导入JSON文件并生成CSS自定义属性(变量)

时间:2021-05-20 02:52:20
【文件属性】:
文件名称:postcss-import-json:导入JSON文件并生成CSS自定义属性(变量)
文件大小:3KB
文件格式:ZIP
更新时间:2021-05-20 02:52:20
JavaScript PostCSS导入JSON 导入JSON文件并生成CSS自定义属性(变量)。 用法 安装插件。 npm i -D @daltontan/postcss-import-json 添加到您的PostCSS配置: module.exports = { plugins: [ require('@daltontan/postcss-import-json'), ] } 添加到您CSS文件中: :root { @import-json './path/to.json'; } 该路径是相对于CSS文件的。 选项 地图 转换变量值的函数。 例如: @param {string[]} selector - The keys that form the current value e.g. {parent: {child: 'value'}} will have the child
【文件预览】:
postcss-import-json-master
----LICENSE(742B)
----README.md(1KB)
----index.js(976B)
----package.json(316B)

网友评论