Skip to content

Commit be4fc3a

Browse files
committed
Provide a default tracking with Font Size config
We can already configure line-height with font sizes, but this allows us to also specify the default tracking for these sizes too. This can be overwritten with tracking utilities.
1 parent 72a2d39 commit be4fc3a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/plugins/fontSize.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ 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, lineHeight, letterSpacing] = Array.isArray(value) ? value : [value]
88

99
return [
1010
`.${e(`text-${modifier}`)}`,
@@ -15,6 +15,11 @@ export default function() {
1515
: {
1616
'line-height': lineHeight,
1717
}),
18+
...(letterSpacing === undefined
19+
? {}
20+
: {
21+
'letter-spacing': letterSpacing,
22+
}),
1823
},
1924
]
2025
})

0 commit comments

Comments
 (0)