polished 介绍
在JavaScript中编写样式时,许多人需要Sass风格的帮助 函数 才能提高工作效率。? polished将它们带给您 一个 漂亮,轻量级的包,为JavaScript中的样式量身定制。
与Sass的主要区别在于它是以 功能 风格编写的,并且所有颜色 功能 都是咖喱。这意味着您可以将它们组合成您自己的可重复使用的助手,具有compose您选择的 功能 :
import { compose } from 'ramda' // Replace with any compose() function of your choice
import { lighten,desaturate } from 'polished'
// Create tone() helper
const tone = compose(lighten(0.1),desaturate(0.1))
安装
npm install --save polished
# or if you're using yarn
yarn add polished
网站地址 : https://polished.js.org/
GitHub: https://github.com/styled-components/polished
网站描述: 一种用于在JavaScript中编写样式的轻量级工具集
polished官方网站
官方网站: https://polished.js.org/
如果觉得 网站内容还不错,欢迎将 网站 推荐给程序员好友。
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did174407