File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
- - Nothing yet!
10
+ ### Fixed
11
+
12
+ - Fixed broken color styles ([ #405 ] ( https://github.com/tailwindlabs/tailwindcss-typography/pull/405 ) )
11
13
12
14
## [ 0.5.18] - 2025-09-19
13
15
Original file line number Diff line number Diff line change @@ -14,14 +14,16 @@ const opacity = (color, opacity) => {
14
14
// values.
15
15
let hex = color . replace ( '#' , '' )
16
16
hex = hex . length === 3 ? hex . replace ( / ./ g, '$&$&' ) : hex
17
- const r = parseInt ( hex . substring ( 0 , 2 ) , 16 )
18
- const g = parseInt ( hex . substring ( 2 , 4 ) , 16 )
19
- const b = parseInt ( hex . substring ( 4 , 6 ) , 16 )
17
+
18
+ let r = parseInt ( hex . substring ( 0 , 2 ) , 16 )
19
+ let g = parseInt ( hex . substring ( 2 , 4 ) , 16 )
20
+ let b = parseInt ( hex . substring ( 4 , 6 ) , 16 )
20
21
21
22
if ( Number . isNaN ( r ) || Number . isNaN ( g ) || Number . isNaN ( b ) ) {
22
23
return `color-mix(in oklab, ${ color } ${ opacity } , transparent)`
23
24
}
24
- return `rgb(${ r } , ${ g } , ${ b } / ${ opacity } )`
25
+
26
+ return `rgb(${ r } ${ g } ${ b } / ${ opacity } )`
25
27
}
26
28
27
29
let defaultModifiers = {
You can’t perform that action at this time.
0 commit comments