Skip to content

Commit 2a1426f

Browse files
authored
[v3.2] Add default font-feature-settings documentation (tailwindlabs#1396)
* Document setting default `font-feature-settings` * Tweak wording
1 parent 11c7bca commit 2a1426f

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/pages/docs/font-family.mdx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,23 @@ Note that **Tailwind does not automatically escape font names** for you. If you'
108108

109109
Learn more about customizing the default theme in the [theme customization](/docs/theme#customizing-the-default-theme) documentation.
110110

111+
#### Providing default font-feature-settings
112+
113+
You can optionally provide default [font-feature-settings](https://developer.mozilla.org/en-US/docs/Web/CSS/font-feature-settings) for each font in your project using a tuple of the form `[fontFamilies, { fontFeatureSettings }]` when configuring custom fonts.
114+
115+
```diff-js tailwind.config.js
116+
module.exports = {
117+
theme: {
118+
fontFamily: {
119+
sans: [
120+
"Inter var, sans-serif",
121+
+ { fontFeatureSettings: '"cv11", "ss01"' },
122+
],
123+
},
124+
},
125+
}
126+
```
127+
111128
### Arbitrary values
112129

113130
<ArbitraryValues property="font-family" featuredClass="font-['Open_Sans']" element="p" />
@@ -118,7 +135,7 @@ For convenience, [Preflight](/docs/preflight) sets the font family on the `html`
118135

119136
```diff-js tailwind.config.js
120137
const defaultTheme = require('tailwindcss/defaultTheme')
121-
138+
122139
module.exports = {
123140
theme: {
124141
extend: {

0 commit comments

Comments
 (0)