postcss-pxtorem:使用PostCSS将像素单位转换为rem(根em)单位

时间:2021-04-06 04:57:19
【文件属性】:
文件名称:postcss-pxtorem:使用PostCSS将像素单位转换为rem(根em)单位
文件大小:58KB
文件格式:ZIP
更新时间:2021-04-06 04:57:19
postcss rem-units pixel-units JavaScript postcss-pxtorem 的插件,可从像素单位生成rem单位。 安装 $ npm install postcss postcss-pxtorem --save-dev 用法 像素是最容易使用的单位(观点)。 它们的唯一问题是它们不允许浏览器将默认字体大小更改为16。此脚本将从您选择的允许浏览器设置字体大小的属性中将每个px值转换为rem。 输入输出 使用默认设置,仅定位与字体相关的属性。 / / input h1 { margin : 0 0 20px; font - size : 32px; line-height : 1.2; letter - spacing : 1px; } / / output h1 { margin : 0 0 20px; font - size : 2rem; line-height : 1.2
【文件预览】:
postcss-pxtorem-master
----example()
--------main-rem.css(455B)
--------index.js(393B)
--------.eslintrc.js(57B)
--------main.css(348B)
----index.js(5KB)
----package.json(918B)
----.github()
--------workflows()
----.prettierrc(40B)
----LICENSE(1KB)
----package-lock.json(190KB)
----.npmignore(29B)
----.eslintrc.js(277B)
----spec()
--------pxtorem-spec.js(16KB)
----.gitignore(13B)
----lib()
--------type.js(346B)
--------filter-prop-list.js(740B)
--------pixel-unit-regex.js(328B)
----README.md(4KB)
----.editorconfig(181B)
----.gitattributes(19B)

网友评论