weekly
weekly copied to clipboard
【开源自荐】面向 Vue3 的 CSS in JS 工具库
项目地址:https://github.com/v-vibe/vue-styled-components 文档地址:vue-styled-components.com
❤项目初衷
想在 Vue3 像 React 一样使用 styled components,但是 Vue 版本的 styled components 只支持 Vue2,且项目作者不再更新,因此决定重新开发一个能在 Vue3 使用的 styled components 工具库。
目前基本还原 styled components 大部分核心 API。
✨特性
✅ 样式化 Vue 组件或原生组件
✅ 添加默认 Attributes
✅ 传递 Props
✅ 支持主题化
✅ 生成关键帧
✅ 生成 CSS 片段
✅ 创建全局样式
✅ 支持通过 withAttrs 重新设置或覆盖 Attributes
✅ 支持 CSS 嵌套。(仅支持 web: https://drafts.csswg.org/css-nesting/#nesting)