Closed zombieJ closed 2 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
π Inspect: https://vercel.com/ant-design/cssinjs/Ht4fg5WF44rJaAN28vcRbYUCCc5M
β
Preview: https://cssinjs-git-cssinjs-ant-design.vercel.app
ζζ‘£εθ‘₯
π° Preview
link 404
π₯ Summary
To reduce v4 less style migration cost. We want to provide a light-way cssinjs resolution. Which keep the origin style structure as less and resolve micro-app style conflict.
π€Ώ Motivation
As research of emotion.js, its strong cssinjs resolution. To enable light-way migration purpose, we use
stylis
@emotion/hash
@emotion/unitless
and mix them with component specific library.π° Preview
https://cssinjs-git-cssinjs-ant-design.vercel.app/
π Usage
Follow the
docs/examples/components/theme.tsx
. Here is the simple example:Generate Design Token
Use
@ant-design/cssinjs
to create a customize design token:And define the derivative token:
Define the algorithm:
Now you can get the merged token with default token and customize token:
Use Token in Component
Generate style by token:
Use in component: