-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JIT: Add caret-color utilities (#4499)
Co-Authored-By: Jesse Katsumata <[email protected]> Co-authored-by: Jesse Katsumata <[email protected]>
- Loading branch information
1 parent
e6ea821
commit 77dfac2
Showing
6 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'], | ||
} | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters