Appearance
Configuring font sizes and screens
You can configure "to" and "from"
<fontSize>s using thetheme.fontSizesection of your Tailwind config file.You can configure your own custom set of "from"
<fontSize>s using thetheme.fontSizeFromsection of your Tailwind config file, and your own custom set of "to"<fontSize>s using thetheme.fontSizeTosection of your Tailwind config file.theme.fontSizeFromandtheme.fontSizeTovalues accept a<screen>. See Usage: Font sizes and screens for screen value requirements and limitations.You can configure "to" and "from"
<screen>s using thetheme.screenssection of your Tailwind config file.You can also configure them in the
theme.fontSizeScreenssection of your Tailwind config file. Use validtheme.screensvalues.And you can configure "from"
<screen>s using thetheme.fontSizeFromScreenssection of your Tailwind config file, and "to"<screen>s using thetheme.fontSizeToScreenssection. Use validtheme.screensvalues.
WARNING
See Usage: Font sizes and screens for value requirements and limitations.
js
// …
theme: {
extends: {
fontSize: {
// this is vanilla Tailwind
// can use as <fontSize> in text-from-* and text-to-*
a: '47px',
b: ['7rem', '4'],
c: ['40px', { fontWeight: '7' }],
},
screens: {
// this is vanilla Tailwind
// can use as <screen> in text-from-* and text-to-*
d: '470px',
e: { min: '740px' },
f: { max: '74rem' },
},
},
fontSizeFrom: ({ theme }) => ({
// additional text-from-* <fontSize>s
g: ['4rem', '7'],
h: {
fontSize: theme('fontSize.3xl'),
screen: '714px',
}
}),
fontSizeFromScreens: {
// additional text-from-* <screen>s
i: '77rem',
},
fontSizeScreens: {
// additional text-from-* and text-to-* <screen>s
// in case of key conflict with fontSizeFromScreens or fontSizeToScreens,
// fontSize(From|To)Screens wins out over fontSizeScreens
j: '474px',
},
fontSizeTo: ({ theme }) => ({
// additional text-to-* <fontSize>s
k: {
fontSize: ['47px', {
lineHeight: '40px',
fontWeight: '500',
}],
screen: theme('screens.xl'),
}
}),
fontSizeToScreens: {
// additional text-to-* <screen>s
l: { min: '747px' },
},
},
// …