Skip to content

Commit 8a95f03

Browse files
authored
Merge pull request #1357 from tailwindcss/use-font-sans-by-default
Use font-sans as the default font, not the system font
2 parents 09e7584 + bdbec26 commit 8a95f03

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

__tests__/fixtures/tailwind-output-important.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,8 @@ ul {
407407
*/
408408

409409
/**
410-
* 1. Use Tailwind's default sans-serif font stack as a sane default.
410+
* 1. Use the user's configured `sans` font-family (with Tailwind's default
411+
* sans-serif font stack as a fallback) as a sane default.
411412
* 2. Use Tailwind's default "normal" line-height so the user isn't forced
412413
* to override it to ensure consistency even when using the default theme.
413414
*/

__tests__/fixtures/tailwind-output.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,8 @@ ul {
407407
*/
408408

409409
/**
410-
* 1. Use Tailwind's default sans-serif font stack as a sane default.
410+
* 1. Use the user's configured `sans` font-family (with Tailwind's default
411+
* sans-serif font stack as a fallback) as a sane default.
411412
* 2. Use Tailwind's default "normal" line-height so the user isn't forced
412413
* to override it to ensure consistency even when using the default theme.
413414
*/

src/plugins/css/preflight.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,14 @@ ul {
5757
*/
5858

5959
/**
60-
* 1. Use Tailwind's default sans-serif font stack as a sane default.
60+
* 1. Use the user's configured `sans` font-family (with Tailwind's default
61+
* sans-serif font stack as a fallback) as a sane default.
6162
* 2. Use Tailwind's default "normal" line-height so the user isn't forced
6263
* to override it to ensure consistency even when using the default theme.
6364
*/
6465

6566
html {
66-
font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 1 */
67+
font-family: theme('fontFamily.sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 1 */
6768
line-height: 1.5; /* 2 */
6869
}
6970

0 commit comments

Comments
 (0)