This plugin generates utility classes for Tailwind CSS from design tokens set in the local style of Figma.
*Currently only color styles are supported.
If this option is checked, the primitive styles referenced by the semantic style are generated as CSS variables.
read more: https://tailwindcss.com/docs/customizing-colors#using-css-variables
If this option is checked and the style name matches a specific value, the style is classified under the corresponding key.
For example
// If there is no match, everything is classified as 'colors'
colors: {
primary: '#000000', // primary
object: {
primary: '#000000', // object/primary
},
},
// If the style name begins with 'bg/'
backgroundColor: {
primary: '#000000', // bg/primary
secondary: '#000000', // bg/seconcary
},
// If the style name starts with 'text/'
textColor: {
primary: '#000000', // text/primay
accent: {
primay: '#000000', // text/accent/primay
},
},
The correspondence between style names and keys is as follows.
style name | key |
---|---|
accent/* | accentColor |
bg/* | backgroundColor |
border/* | borderColor |
shadow/* | boxShadowColor |
caret/* | caretColor |
divide/* | divideColor |
outline/* | outlineColor |
placeholder/* | placeholderColor |
ring/* | ringColor |
ring-offset/* | ringOffsetColor |
text/* | textColor |
decoration/* | textDecorationColor |
read more: https://tailwindcss.com/docs/theme#configuration-reference