mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-17 19:21:23 +03:00
Add a docsref shortcode.
This allows for the build to fail if a reference isn't found.
This commit is contained in:
@@ -41,7 +41,7 @@ Breaking it down, here's how it works:
|
||||
- Column classes indicate the number of columns you'd like to use out of the possible 12 per row. So, if you want three equal-width columns across, you can use `.col-4`.
|
||||
- Column `width`s are set in percentages, so they're always fluid and sized relative to their parent element.
|
||||
- Columns have horizontal `padding` to create the gutters between individual columns, however, you can remove the `margin` from rows and `padding` from columns with `.no-gutters` on the `.row`.
|
||||
- To make the grid responsive, there are five grid breakpoints, one for each [responsive breakpoint](/docs/{{< param docs_version >}}/layout/overview/#responsive-breakpoints): all breakpoints (extra small), small, medium, large, and extra large.
|
||||
- To make the grid responsive, there are five grid breakpoints, one for each [responsive breakpoint]({{< docsref "/layout/overview#responsive-breakpoints" >}}): all breakpoints (extra small), small, medium, large, and extra large.
|
||||
- Grid breakpoints are based on minimum width media queries, meaning **they apply to that one breakpoint and all those above it** (e.g., `.col-sm-4` applies to small, medium, large, and extra large devices, but not the first `xs` breakpoint).
|
||||
- You can use predefined grid classes (like `.col-4`) or [Sass mixins](#sass-mixins) for more semantic markup.
|
||||
|
||||
@@ -233,7 +233,7 @@ Use `col-{breakpoint}-auto` classes to size columns based on the natural width o
|
||||
|
||||
### Equal-width multi-row
|
||||
|
||||
Create equal-width columns that span multiple rows by inserting a `.w-100` where you want the columns to break to a new line. Make the breaks responsive by mixing the `.w-100` with some [responsive display utilities](/docs/{{< param docs_version >}}/utilities/display/).
|
||||
Create equal-width columns that span multiple rows by inserting a `.w-100` where you want the columns to break to a new line. Make the breaks responsive by mixing the `.w-100` with some [responsive display utilities]({{< docsref "/utilities/display" >}}).
|
||||
|
||||
<div class="bd-example-row">
|
||||
{{< example >}}
|
||||
@@ -455,7 +455,7 @@ Use flexbox alignment utilities to vertically and horizontally align columns.
|
||||
|
||||
The gutters between columns in our predefined grid classes can be removed with `.no-gutters`. This removes the negative `margin`s from `.row` and the horizontal `padding` from all immediate children columns.
|
||||
|
||||
Here's the source code for creating these styles. Note that column overrides are scoped to only the first children columns and are targeted via [attribute selector](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors). While this generates a more specific selector, column padding can still be further customized with [spacing utilities](/docs/{{< param docs_version >}}/utilities/spacing/).
|
||||
Here's the source code for creating these styles. Note that column overrides are scoped to only the first children columns and are targeted via [attribute selector](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors). While this generates a more specific selector, column padding can still be further customized with [spacing utilities]({{< docsref "/utilities/spacing" >}}).
|
||||
|
||||
**Need an edge-to-edge design?** Drop the parent `.container` or `.container-fluid`.
|
||||
|
||||
@@ -520,7 +520,7 @@ Breaking columns to a new line in flexbox requires a small hack: add an element
|
||||
{{< /example >}}
|
||||
</div>
|
||||
|
||||
You may also apply this break at specific breakpoints with our [responsive display utilities](/docs/{{< param docs_version >}}/utilities/display/).
|
||||
You may also apply this break at specific breakpoints with our [responsive display utilities]({{< docsref "/utilities/display" >}}).
|
||||
|
||||
<div class="bd-example-row">
|
||||
{{< example >}}
|
||||
@@ -585,7 +585,7 @@ There are also responsive `.order-first` and `.order-last` classes that change t
|
||||
|
||||
### Offsetting columns
|
||||
|
||||
You can offset grid columns in two ways: our responsive `.offset-` grid classes and our [margin utilities](/docs/{{< param docs_version >}}/utilities/spacing/). Grid classes are sized to match columns while margins are more useful for quick layouts where the width of the offset is variable.
|
||||
You can offset grid columns in two ways: our responsive `.offset-` grid classes and our [margin utilities]({{< docsref "/utilities/spacing" >}}). Grid classes are sized to match columns while margins are more useful for quick layouts where the width of the offset is variable.
|
||||
|
||||
#### Offset classes
|
||||
|
||||
@@ -609,7 +609,7 @@ Move columns to the right using `.offset-md-*` classes. These classes increase t
|
||||
{{< /example >}}
|
||||
</div>
|
||||
|
||||
In addition to column clearing at responsive breakpoints, you may need to reset offsets. See this in action in [the grid example](/docs/{{< param docs_version >}}/examples/grid/).
|
||||
In addition to column clearing at responsive breakpoints, you may need to reset offsets. See this in action in [the grid example]({{< docsref "/examples/grid" >}}).
|
||||
|
||||
<div class="bd-example-row">
|
||||
{{< example >}}
|
||||
|
||||
@@ -8,18 +8,18 @@ toc: true
|
||||
|
||||
## Changing `display`
|
||||
|
||||
Use our [display utilities](/docs/{{< param docs_version >}}/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.
|
||||
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 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](/docs/{{< param docs_version >}}/components/alerts/) are built with flexbox enabled.
|
||||
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]({{< 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](/docs/{{< param docs_version >}}/utilities/flex/) for sizing, alignment, spacing, and more.
|
||||
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](/docs/{{< param docs_version >}}/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).
|
||||
Use the `margin` and `padding` [spacing utilities]({{< docsref "/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](/docs/{{< param docs_version >}}/utilities/visibility/). Invisible elements will still affect the layout of the page, but are visually hidden from visitors.
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user