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() {
4
4
return function ( { addUtilities, e, theme, variants } ) {
5
5
const utilities = _ . fromPairs (
6
6
_ . 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
8
12
9
13
return [
10
14
`.${ e ( `text-${ modifier } ` ) } ` ,
@@ -15,6 +19,11 @@ export default function() {
15
19
: {
16
20
'line-height' : lineHeight ,
17
21
} ) ,
22
+ ...( letterSpacing === undefined
23
+ ? { }
24
+ : {
25
+ 'letter-spacing' : letterSpacing ,
26
+ } ) ,
18
27
} ,
19
28
]
20
29
} )
You can’t perform that action at this time.
0 commit comments