Skip to content

Commit cd452e3

Browse files
committed
alpha of 100% is the default
1 parent 13db1ad commit cd452e3

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/tailwindcss/src/utilities.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ export function withAlpha(value: string, alpha: string): string {
173173
alpha = `${alphaAsNumber * 100}%`
174174
}
175175

176+
// No need for `color-mix` if the alpha is `100%`
177+
if (alpha === '100%') {
178+
return value
179+
}
180+
176181
return `color-mix(in oklab, ${value} ${alpha}, transparent)`
177182
}
178183

0 commit comments

Comments
 (0)