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
77
88## [ Unreleased]
99
10- - Nothing yet!
10+ ### Fixed
11+
12+ - Fixed broken color styles ([ #405 ] ( https://github.com/tailwindlabs/tailwindcss-typography/pull/405 ) )
1113
1214## [ 0.5.18] - 2025-09-19
1315
Original file line number Diff line number Diff line change @@ -14,14 +14,16 @@ const opacity = (color, opacity) => {
1414 // values.
1515 let hex = color . replace ( '#' , '' )
1616 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 )
2021
2122 if ( Number . isNaN ( r ) || Number . isNaN ( g ) || Number . isNaN ( b ) ) {
2223 return `color-mix(in oklab, ${ color } ${ opacity } , transparent)`
2324 }
24- return `rgb(${ r } , ${ g } , ${ b } / ${ opacity } )`
25+
26+ return `rgb(${ r } ${ g } ${ b } / ${ opacity } )`
2527}
2628
2729let defaultModifiers = {
You can’t perform that action at this time.
0 commit comments