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
GitHub:https://github.com/styled-components/polished
网站描述:一种用于在JavaScript中编写样式的轻量级工具集
polished
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。