mirror of
https://github.com/twbs/bootstrap.git
synced 2025-12-28 05:33:57 +00:00
Improve display docs, remove print display utils
This commit is contained in:
parent
36bb31724d
commit
0ac7e2881e
@ -92,7 +92,6 @@ $utilities: map.merge(
|
||||
// scss-docs-start utils-display
|
||||
"display": (
|
||||
responsive: true,
|
||||
print: true,
|
||||
property: display,
|
||||
class: d,
|
||||
important: true,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Display property
|
||||
description: Quickly and responsively toggle the display value of components and more with our display utilities. Includes support for some of the more common values, as well as some extras for controlling display when printing.
|
||||
description: Quickly and responsively toggle the display value of components and more with our display utilities.
|
||||
toc: true
|
||||
reference:
|
||||
- class: d-none
|
||||
@ -36,6 +36,9 @@ reference:
|
||||
- class: d-inline-flex
|
||||
styles:
|
||||
display: 'inline-flex'
|
||||
- class: d-contents
|
||||
styles:
|
||||
display: 'contents'
|
||||
- class: d-flow-root
|
||||
styles:
|
||||
display: 'flow-root'
|
||||
@ -74,7 +77,7 @@ The media queries affect screen widths with the given breakpoint *or larger*. Fo
|
||||
|
||||
## Clearfix
|
||||
|
||||
There's no more clearfix helper in v6 as it's an outdated technique. Instead, use the `display: flow-root` utility, `.d-flow-root`. This forces a container element to create a new block formatting context without the clearfix.
|
||||
There's no more clearfix helper in Bootstrap 6 as it's an outdated technique. Instead, use the `display: flow-root` utility, `.d-flow-root`. This forces a container element to create a new block formatting context without the clearfix.
|
||||
|
||||
<Example code={`<div class="d-flow-root">
|
||||
<div class="float-end px-3 py-2 border rounded-3">Floated element</div>
|
||||
@ -118,28 +121,6 @@ To show an element only on a given interval of screen sizes you can combine one
|
||||
<Example code={`<div class="d-lg-none">hide on lg and wider screens</div>
|
||||
<div class="d-none d-lg-block">hide on screens smaller than lg</div>`} />
|
||||
|
||||
## Display in print
|
||||
|
||||
Change the `display` value of elements when printing with our print display utility classes. Includes support for the same `display` values as our responsive `.d-*` utilities.
|
||||
|
||||
- `.d-print-none`
|
||||
- `.d-print-inline`
|
||||
- `.d-print-inline-block`
|
||||
- `.d-print-block`
|
||||
- `.d-print-grid`
|
||||
- `.d-print-inline-grid`
|
||||
- `.d-print-table`
|
||||
- `.d-print-table-row`
|
||||
- `.d-print-table-cell`
|
||||
- `.d-print-flex`
|
||||
- `.d-print-inline-flex`
|
||||
|
||||
The print and display classes can be combined.
|
||||
|
||||
<Example code={`<div class="d-print-none">Screen Only (Hide on print only)</div>
|
||||
<div class="d-none d-print-block">Print Only (Hide on screen only)</div>
|
||||
<div class="d-none d-lg-block d-print-block">Hide up to large on screen, but always show on print</div>`} />
|
||||
|
||||
## CSS
|
||||
|
||||
### Sass utilities API
|
||||
|
||||
Loading…
Reference in New Issue
Block a user