aboutsummaryrefslogtreecommitdiff
path: root/docs/layout/utilities-for-layout.md
diff options
context:
space:
mode:
authorPierre Vanduynslager <[email protected]>2017-04-08 18:43:25 -0400
committerGitHub <[email protected]>2017-04-08 18:43:25 -0400
commitfe72daf2b34263d3cfc9bc77e9998cd22adfa34d (patch)
tree15dc9fc6fcb513362ba112d52ab01b568b423709 /docs/layout/utilities-for-layout.md
parentf5cc59145642d78d7abbdf38fee1905786da5367 (diff)
parentfeb35b94a61c4d6016be8d1773a79a6bbe57d856 (diff)
downloadbootstrap-fe72daf2b34263d3cfc9bc77e9998cd22adfa34d.tar.xz
bootstrap-fe72daf2b34263d3cfc9bc77e9998cd22adfa34d.zip
Merge branch 'v4-dev' into dropdown-keyboard
Diffstat (limited to 'docs/layout/utilities-for-layout.md')
-rw-r--r--docs/layout/utilities-for-layout.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/layout/utilities-for-layout.md b/docs/layout/utilities-for-layout.md
new file mode 100644
index 000000000..12ba7006c
--- /dev/null
+++ b/docs/layout/utilities-for-layout.md
@@ -0,0 +1,31 @@
+---
+layout: docs
+title: Utilities for layout
+description: Use any of our dozens of responsive utility classes for showing, hiding, aligning, and spacing content.
+group: layout
+---
+
+For faster mobile-friendly and responsive development, Bootstrap includes dozens of utility classes for showing, hiding, aligning, and spacing content. Below is a primer on what's included in Bootstrap and how these utilities can help you with layout.
+
+## Contents
+
+* Will be replaced with the ToC, excluding the "Contents" header
+{:toc}
+
+## Changing `display`
+
+Use our `display` utilities for responsively toggling common values of the `display` property. Mix it with our grid system, content, or components to show or hide them across specific viewports.
+
+## Flexbox options
+
+Bootstrap 4 is built with flexbox, but not every element's `display` has been changed to `display: flex` as this would add many unnecessary overrides and unexpectedly change key browser behaviors. Most of [our components](/components/) are built with flexbox enabled.
+
+Should you need to add `display: flex` to an element, do so with `.d-flex` or one of the responsive variants (e.g., `.d-sm-flex`). You'll need this class or `display` value to allow the use of our extra [flexbox utilities](/utilities/flexbox/) for sizing, alignment, spacing, and more.
+
+## Margin and padding
+
+Use the `margin` and `padding` [spacing utilities](/utilities/spacing/) to control how elements and components are spaced and sized. Bootstrap 4 includes a five-level scale for spacing utilities, based on a `1rem` value default `$spacer` variable. Choose values for all viewports (e.g., `.mr-3` for `margin-right: 1rem`), or pick responsive variants to target specific viewports (e.g., `.mr-md-3` for `margin-right: 1rem` starting at the `md` breakpoint).
+
+## Toggle `visibility`
+
+When toggling `display` isn't needed, you can toggle the `visibility` of an element with our [visibility utilities](/utilities/visibility/). Invisible elements will still affect the layout of the page, but are visually hidden from visitors.