Skip to content

Commit

Permalink
Merge pull request tailwindlabs#1357 from tailwindcss/use-font-sans-b…
Browse files Browse the repository at this point in the history
…y-default

Use font-sans as the default font, not the system font
  • Loading branch information
adamwathan authored Feb 3, 2020
2 parents 09e7584 + bdbec26 commit 8a95f03
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion __tests__/fixtures/tailwind-output-important.css
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ ul {
*/

/**
* 1. Use Tailwind's default sans-serif font stack as a sane default.
* 1. Use the user's configured `sans` font-family (with Tailwind's default
* sans-serif font stack as a fallback) as a sane default.
* 2. Use Tailwind's default "normal" line-height so the user isn't forced
* to override it to ensure consistency even when using the default theme.
*/
Expand Down
3 changes: 2 additions & 1 deletion __tests__/fixtures/tailwind-output.css
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ ul {
*/

/**
* 1. Use Tailwind's default sans-serif font stack as a sane default.
* 1. Use the user's configured `sans` font-family (with Tailwind's default
* sans-serif font stack as a fallback) as a sane default.
* 2. Use Tailwind's default "normal" line-height so the user isn't forced
* to override it to ensure consistency even when using the default theme.
*/
Expand Down
5 changes: 3 additions & 2 deletions src/plugins/css/preflight.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ ul {
*/

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

html {
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 */
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 */
line-height: 1.5; /* 2 */
}

Expand Down

0 comments on commit 8a95f03

Please sign in to comment.