diff options
| author | Mark Otto <[email protected]> | 2020-04-02 11:44:07 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2020-04-13 13:55:34 -0700 |
| commit | 33a4e8ff9b7ef7ec00e769d7a70d3634c19b08df (patch) | |
| tree | 184e24893803bbbf4c102b66402da4f8638f56fc /site/content/docs/4.3/layout/utilities.md | |
| parent | bb3e5f712a3b1b79d85a6f15ad32bafcf6c77f66 (diff) | |
| download | bootstrap-33a4e8ff9b7ef7ec00e769d7a70d3634c19b08df.tar.xz bootstrap-33a4e8ff9b7ef7ec00e769d7a70d3634c19b08df.zip | |
Rewrite grid docs to account for new grid tier
- Breaks grid content across multiple pages
- Updates mentions of grid tiers from five to six
- Rewrites how it works sections to reference new options and tiers
Diffstat (limited to 'site/content/docs/4.3/layout/utilities.md')
| -rw-r--r-- | site/content/docs/4.3/layout/utilities.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/site/content/docs/4.3/layout/utilities.md b/site/content/docs/4.3/layout/utilities.md new file mode 100644 index 000000000..af1cf2580 --- /dev/null +++ b/site/content/docs/4.3/layout/utilities.md @@ -0,0 +1,25 @@ +--- +layout: docs +title: Utilities for layout +description: For faster mobile-friendly and responsive development, Bootstrap includes dozens of utility classes for showing, hiding, aligning, and spacing content. +group: layout +toc: true +--- + +## Changing `display` + +Use our [display utilities]({{< docsref "/utilities/display" >}}) 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 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]({{< docsref "/components/alerts" >}}) 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]({{< docsref "/utilities/flex" >}}) for sizing, alignment, spacing, and more. + +## Margin and padding + +Use the `margin` and `padding` [spacing utilities]({{< docsref "/utilities/spacing" >}}) to control how elements and components are spaced and sized. Bootstrap includes a six-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]({{< docsref "/utilities/visibility" >}}). Invisible elements will still affect the layout of the page, but are visually hidden from visitors. |
