File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,11 @@ export default function() {
44 return function ( { addUtilities, e, theme, variants } ) {
55 const utilities = _ . fromPairs (
66 _ . map ( theme ( 'fontSize' ) , ( value , modifier ) => {
7- const [ fontSize , lineHeight ] = Array . isArray ( value ) ? value : [ value ]
7+ const [ fontSize , options ] = Array . isArray ( value ) ? value : [ value ]
8+ // Tailwind 1.3+ syntax allowed line height to be specified in the array like
9+ // ['16px', '24px'], so we can get it from there as well as from object syntax
10+ const lineHeight = options instanceof Object ? options . lineHeight : options
11+ const letterSpacing = options && options . letterSpacing
812
913 return [
1014 `.${ e ( `text-${ modifier } ` ) } ` ,
@@ -15,6 +19,11 @@ export default function() {
1519 : {
1620 'line-height' : lineHeight ,
1721 } ) ,
22+ ...( letterSpacing === undefined
23+ ? { }
24+ : {
25+ 'letter-spacing' : letterSpacing ,
26+ } ) ,
1827 } ,
1928 ]
2029 } )
You can’t perform that action at this time.
0 commit comments