From bf8b84fa0f6408fe49429d87c8b9dd0b48f67a69 Mon Sep 17 00:00:00 2001 From: Studio Rectangle <138102850+StudioRectangle@users.noreply.github.com> Date: Sat, 8 Jul 2023 12:10:33 +0200 Subject: [PATCH] Fix Tailwind placeholder Replace the special placeholder. Tailwind CSS uses this placeholder to inject the alpha value when using an opacity modifier. The placeholder has been replaced with the default value of 1. Currently, the color value is copied as is, leading to broken colors such as --wp-preset-color--primary: rgba(0 0 0 / ). This fix ensures that the value is replaced with --wp-preset-color--primary: rgba(0 0 0 / 1). --- .../@roots/bud-tailwindcss-theme-json/src/tailwind/palette.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/@roots/bud-tailwindcss-theme-json/src/tailwind/palette.ts b/sources/@roots/bud-tailwindcss-theme-json/src/tailwind/palette.ts index 5b5dbb3026..2acb8042b6 100644 --- a/sources/@roots/bud-tailwindcss-theme-json/src/tailwind/palette.ts +++ b/sources/@roots/bud-tailwindcss-theme-json/src/tailwind/palette.ts @@ -34,7 +34,7 @@ export interface transformEntry { (slug: Array, color: string): WordPressColors[any] } export const transformEntry: transformEntry = (slug, color) => ({ - color: color.toLowerCase(), + color: color.toLowerCase().replace(/\/ /g, '/ 1'), name: name(slug), slug: slug.join(`-`).toLowerCase(), })