JIT: Add caret-color utilities (#4499)
Co-Authored-By: Jesse Katsumata <niconico.clarinet@gmail.com> Co-authored-by: Jesse Katsumata <niconico.clarinet@gmail.com>
This commit is contained in:
parent
e6ea821a7a
commit
77dfac2bfa
6 changed files with 26 additions and 1 deletions
19
src/plugins/caretColor.js
Normal file
19
src/plugins/caretColor.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import flattenColorPalette from '../util/flattenColorPalette'
|
||||
import toColorValue from '../util/toColorValue'
|
||||
|
||||
export default function () {
|
||||
return function ({ matchUtilities, theme, variants }) {
|
||||
matchUtilities(
|
||||
{
|
||||
caret: (value) => {
|
||||
return { 'caret-color': toColorValue(value) }
|
||||
},
|
||||
},
|
||||
{
|
||||
values: flattenColorPalette(theme('caretColor')),
|
||||
variants: variants('caretColor'),
|
||||
type: ['color', 'any'],
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -123,6 +123,7 @@ export { default as textDecoration } from './textDecoration'
|
|||
export { default as fontSmoothing } from './fontSmoothing'
|
||||
export { default as placeholderColor } from './placeholderColor'
|
||||
export { default as placeholderOpacity } from './placeholderOpacity'
|
||||
export { default as caretColor } from './caretColor'
|
||||
|
||||
export { default as opacity } from './opacity'
|
||||
export { default as backgroundBlendMode } from './backgroundBlendMode'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue