mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
20 lines
485 B
JavaScript
20 lines
485 B
JavaScript
import flattenColorPalette from '../util/flattenColorPalette'
|
|
import toColorValue from '../util/toColorValue'
|
|
|
|
export default function () {
|
|
return function ({ matchUtilities, theme, variants }) {
|
|
matchUtilities(
|
|
{
|
|
accent: (value) => {
|
|
return { 'accent-color': toColorValue(value) }
|
|
},
|
|
},
|
|
{
|
|
values: flattenColorPalette(theme('accentColor')),
|
|
variants: variants('accentColor'),
|
|
type: 'color',
|
|
}
|
|
)
|
|
}
|
|
}
|