File tree Expand file tree Collapse file tree 4 files changed +672
-675
lines changed Expand file tree Collapse file tree 4 files changed +672
-675
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,15 @@ export { defineColorVariables } from './plugin'
3
3
4
4
type VariableColors = {
5
5
[ key in keyof DefaultColors ] : DefaultColors [ key ] extends `#${string } `
6
- ? `rgb(var(--tw-color-${key } )/var(--tw-text-opacity) )`
6
+ ? `rgb(var(--tw-color-${key } ) / <alpha-value> )`
7
7
: DefaultColors [ key ] extends string
8
8
? // has no uppercase letter
9
9
DefaultColors [ key ] extends Lowercase < DefaultColors [ key ] >
10
10
? key
11
11
: DefaultColors [ key ]
12
12
: {
13
13
[ level in keyof DefaultColors [ key ] ] : level extends string | number
14
- ? `rgb(var(--tw-color-${key } -${level } )/var(--tw-text-opacity) )`
14
+ ? `rgb(var(--tw-color-${key } -${level } ) / <alpha-value> )`
15
15
: never
16
16
}
17
17
}
@@ -28,15 +28,15 @@ export function createVariableColors(colors: DefaultColors) {
28
28
// key color
29
29
variableColors [
30
30
key
31
- ] = `rgb(var(--tw-color-${ key } )/var(--tw-text-opacity) )`
31
+ ] = `rgb(var(--tw-color-${ key } ) / <alpha-value> )`
32
32
}
33
33
} else {
34
34
// tonal palette
35
35
variableColors [ key ] = { }
36
36
for ( const [ level ] of Object . entries ( value ) ) {
37
37
variableColors [ key ] [
38
38
level
39
- ] = `rgb(var(--tw-color-${ key } -${ level } )/var(--tw-text-opacity) )`
39
+ ] = `rgb(var(--tw-color-${ key } -${ level } ) / <alpha-value> )`
40
40
}
41
41
}
42
42
}
You can’t perform that action at this time.
0 commit comments