Stylex: 基于原子化的 CSS-in-JS 解决方案
Stylex 是一种 CSS-in-JS 解决方案,其设计理念源于 Facebook 并借鉴了原子化 CSS 的优势。Stylex 致力于在保留传统 CSS 语法和开发者习惯的同时,提高代码的可维护性,尤其是在大型项目中。
使用 Stylex
- 安装 Stylex 包:
- Yarn:
yarn add @ladifire-opensource/stylex
- NPM:
npm install @ladifire-opensource/stylex
- Yarn:
- 安装对应打包器的插件:
- Webpack:
yarn add @ladifire-opensource/stylex-webpack-plugin
- Next.js:
yarn add @ladifire-opensource/stylex-nextjs-plugin
- Webpack:
stylex:编写具有原子支持CSS-in-JS。就像Facebook的Stylex!
预估大小:147个文件
.eslintrc.js
4KB
lint-packages.js
2KB
bumpVersions.js
8KB
index.html
2KB
favicon.ico
4KB
index.css
366B
.gitignore
310B
.gitignore
231B
index.html
581B
webpack.config.js
5KB
137.05KB
文件大小:
评论区