Update color parsing and formatting (#5442)
* Replace `culori` with simple color parser * Use space-separated color syntax * Update default color values to use space-separated syntax * Update separator regex * Fix tests * add tests for the new `color` util Also slightly modified the `color` util itself to take `transparent` into account and also format every value as a string for consistency. Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
This commit is contained in:
parent
12fa78b9ca
commit
4919cbfbb8
25 changed files with 409 additions and 302 deletions
|
|
@ -1302,7 +1302,7 @@ export let backgroundImage = createUtilityPlugin(
|
|||
)
|
||||
export let gradientColorStops = (() => {
|
||||
function transparentTo(value) {
|
||||
return withAlphaValue(value, 0, 'rgba(255, 255, 255, 0)')
|
||||
return withAlphaValue(value, 0, 'rgb(255 255 255 / 0)')
|
||||
}
|
||||
|
||||
return function ({ matchUtilities, theme }) {
|
||||
|
|
@ -1738,7 +1738,7 @@ export let ringWidth = ({ matchUtilities, addBase, addUtilities, theme }) => {
|
|||
let ringColorDefault = withAlphaValue(
|
||||
theme('ringColor.DEFAULT'),
|
||||
ringOpacityDefault,
|
||||
`rgba(147, 197, 253, ${ringOpacityDefault})`
|
||||
`rgb(147 197 253 / ${ringOpacityDefault})`
|
||||
)
|
||||
|
||||
addBase({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue