You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/docs/fonts.blade.md
+38-31Lines changed: 38 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,44 @@ features:
33
33
34
34
## Customizing
35
35
36
+
By default Tailwind provides three font family utilities: a cross-browser sans-serif stack, a cross-browser serif stack, and a cross-browser monospace stack. You can change, add, or remove these by editing the `fonts` section of your Tailwind config.
Font families can be specified as an array or as a simple comma-delimited string:
47
+
48
+
```js
49
+
{
50
+
// Array format:
51
+
'sans': ['Helvetica', 'Arial', 'sans-serif'],
52
+
53
+
// Comma-delimited format:
54
+
'sans':'Helvetica, Arial, sans-serif',
55
+
}
56
+
```
57
+
58
+
Note that **Tailwind does not automatically escape font names** for you. If you're using a font that contains an invalid identifier, wrap it in quotes or escape the invalid characters.
59
+
60
+
```js
61
+
{
62
+
// Won't work:
63
+
'sans': ['Exo 2', ...],
64
+
65
+
// Add quotes:
66
+
'sans': ['"Exo 2"', ...],
67
+
68
+
// ...or escape the space:
69
+
'sans': ['Exo\\ 2', ...],
70
+
}
71
+
72
+
```
73
+
36
74
@include('_partials.variants-and-disabling', [
37
75
'utility' => [
38
76
'name' => 'font',
@@ -42,34 +80,3 @@ features:
42
80
'responsive',
43
81
],
44
82
])
45
-
46
-
### Note
47
-
48
-
Some font names are required to be wrapped in quotes, such as fonts with an integer in their name.
49
-
50
-
For example, in the fonts section of your config file:
0 commit comments