此站点:https://tailwindcss-custom-forms.netlify.app/给出了示例tailwind.config.js
文件:
// tailwind.config.js
module.exports = {
theme: {
customForms: theme => ({
dark: {
'input, textarea, multiselect, checkbox, radio': {
backgroundColor: theme('colors.gray.900'),
},
select: {
backgroundColor: theme('colors.gray.600'),
},
},
sm: {
'input, textarea, multiselect, select': {
fontSize: theme('fontSize.sm'),
padding: `${theme('spacing.1')} ${theme('spacing.2')}`,
},
select: {
paddingRight: `${theme('spacing.4')}`,
},
'checkbox, radio': {
width: theme('spacing.3'),
height: theme('spacing.3'),
},
}
})
},
plugins: [
require('@tailwindcss/custom-forms'),
]
}
它使用colors.gray.600
表示法设置颜色。但是我需要一种#f90f39
颜色。如何设置?
答案 0 :(得分:0)
您需要在tailwind.config.js
中自定义颜色:https://tailwindcss.com/docs/customizing-colors#app