aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2016-02-06 15:07:39 -0800
committerMark Otto <[email protected]>2016-02-06 15:07:39 -0800
commitc344ff5b17101bec9840a5439b4b79684606c4ba (patch)
tree9a31bcb8cdb7b8147baf25010782b21f76dd1814 /docs
parentd5e474b4ab8fb51d4bf335a026ab56de4dcdb90d (diff)
parent82915622587f316825627f0679406c2d81a5e583 (diff)
downloadbootstrap-c344ff5b17101bec9840a5439b4b79684606c4ba.tar.xz
bootstrap-c344ff5b17101bec9840a5439b4b79684606c4ba.zip
Merge pull request #19098 from twbs/v4-font-stack
v4: Native system font stack for sans-serif
Diffstat (limited to 'docs')
-rw-r--r--docs/assets/scss/_component-examples.scss2
-rw-r--r--docs/content/reboot.md24
-rw-r--r--docs/content/typography.md7
3 files changed, 30 insertions, 3 deletions
diff --git a/docs/assets/scss/_component-examples.scss b/docs/assets/scss/_component-examples.scss
index c3feb6073..2db8f8a2a 100644
--- a/docs/assets/scss/_component-examples.scss
+++ b/docs/assets/scss/_component-examples.scss
@@ -1,3 +1,5 @@
+// scss-lint:disable QualifyingElement
+
//
// Grid examples
//
diff --git a/docs/content/reboot.md b/docs/content/reboot.md
index d55230e59..2c65e6e21 100644
--- a/docs/content/reboot.md
+++ b/docs/content/reboot.md
@@ -32,6 +32,30 @@ The `<html>` and `<body>` elements are updated to provide better page-wide defau
- The `<body>` also sets a global `font-family` and `line-height`. This is inherited later by some form elements to prevent font inconsistencies.
- For safety, the `<body>` has a declared `background-color`, defaulting to `#fff`.
+## Native font stack
+
+The default web (Helvetica Neue, Helvetica, and Arial) fonts have been dropped in Bootstrap 4 and replaced with a "native font stack" for optimum text rendering on every device and OS. Read more about [native font stacks in this Smashing Magazine article](https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/).
+
+{% highlight sass %}
+$font-family-sans-serif:
+ // Safari for OS X and iOS (San Francisco)
+ -apple-system,
+ // Chrome for OS X (San Francisco) and Windows (Segoe UI)
+ BlinkMacSystemFont,
+ // Windows
+ "Segoe UI",
+ // Android
+ "Roboto",
+ // Linux distros
+ "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
+ // Older Android
+ "Droid Sans",
+ // Basic web fallback
+ "Helvetica Neue", Arial, sans-serif !default;
+{% endhighlight %}
+
+This `font-family` is applied to the `<body>` and automatically inherited globally throughout Bootstrap. To switch the global `font-family`, update `$font-family-base` and recompile Bootstrap.
+
## Headings and paragraphs
All heading elements—e.g., `<h1>`—and `<p>` are reset to have their `margin-top` removed. Headings have `margin-bottom: .5rem` added and paragraphs `margin-bottom: 1rem` for easy spacing.
diff --git a/docs/content/typography.md b/docs/content/typography.md
index 82f80a8a8..045620584 100644
--- a/docs/content/typography.md
+++ b/docs/content/typography.md
@@ -15,9 +15,10 @@ Bootstrap includes simple and easily customized typography for headings, body te
Bootstrap sets basic global display, typography, and link styles. Specifically, we:
-- Use `$body-bg` to set a `background-color` on the `<body>` (`#fff` by default)
-- Use the `$font-family-base`, `$font-size-base`, and `$line-height-base` attributes as our typographic base
-- Set the global link color via `$link-color` and apply link underlines only on `:hover`
+- Use a [native font stack](/content/reboot/#native-font-stack) that selects the best `font-family` for each OS and device.
+- Use the `$font-family-base`, `$font-size-base`, and `$line-height-base` attributes as our typographic base applied to the `<body>`.
+- Set the global link color via `$link-color` and apply link underlines only on `:hover`.
+- Use `$body-bg` to set a `background-color` on the `<body>` (`#fff` by default).
These styles can be found within `_reboot.scss`, and the global variables are defined in `_variables.scss`.