Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Enhancement proposal #37900

Merged
merged 1 commit into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/assets/scss/_component-examples.scss
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
background-color: rgba(var(--bd-violet-rgb), .15);
}

.bd-example-flex div {
.bd-example-flex div:not(.vr) {
background-color: rgba(var(--bd-violet-rgb), .15);
border: 1px solid rgba(var(--bd-violet-rgb), .3);
}
Expand Down
32 changes: 16 additions & 16 deletions site/content/docs/5.3/helpers/stacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,44 +17,44 @@ Heads up! Support for gap utilities with flexbox was recently added to Safari, s

Use `.vstack` to create vertical layouts. Stacked items are full-width by default. Use `.gap-*` utilities to add space between items.

{{< example >}}
{{< example class="bd-example-flex" >}}
<div class="vstack gap-3">
<div class="bg-body-tertiary border">First item</div>
<div class="bg-body-tertiary border">Second item</div>
<div class="bg-body-tertiary border">Third item</div>
<div class="p-2">First item</div>
<div class="p-2">Second item</div>
<div class="p-2">Third item</div>
</div>
{{< /example >}}

## Horizontal

Use `.hstack` for horizontal layouts. Stacked items are vertically centered by default and only take up their necessary width. Use `.gap-*` utilities to add space between items.

{{< example >}}
{{< example class="bd-example-flex" >}}
<div class="hstack gap-3">
<div class="bg-body-tertiary border">First item</div>
<div class="bg-body-tertiary border">Second item</div>
<div class="bg-body-tertiary border">Third item</div>
<div class="p-2">First item</div>
<div class="p-2">Second item</div>
<div class="p-2">Third item</div>
</div>
{{< /example >}}

Using horizontal margin utilities like `.ms-auto` as spacers:

{{< example >}}
{{< example class="bd-example-flex" >}}
<div class="hstack gap-3">
<div class="bg-body-tertiary border">First item</div>
<div class="bg-body-tertiary border ms-auto">Second item</div>
<div class="bg-body-tertiary border">Third item</div>
<div class="p-2">First item</div>
<div class="p-2">Second item</div>
<div class="p-2">Third item</div>
</div>
{{< /example >}}

And with [vertical rules]({{< docsref "/helpers/vertical-rule" >}}):

{{< example >}}
{{< example class="bd-example-flex" >}}
<div class="hstack gap-3">
<div class="bg-body-tertiary border">First item</div>
<div class="bg-body-tertiary border ms-auto">Second item</div>
<div class="p-2">First item</div>
<div class="p-2">Second item</div>
<div class="vr"></div>
<div class="bg-body-tertiary border">Third item</div>
<div class="p-2">Third item</div>
</div>
{{< /example >}}

Expand Down
8 changes: 4 additions & 4 deletions site/content/docs/5.3/helpers/vertical-rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ Vertical rules scale their height in flex layouts:

They can also be used in [stacks]({{< docsref "/helpers/stacks" >}}):

{{< example >}}
{{< example class="bd-example-flex" >}}
<div class="hstack gap-3">
<div class="bg-body-tertiary border">First item</div>
<div class="bg-body-tertiary border ms-auto">Second item</div>
<div class="p-2">First item</div>
<div class="p-2 ms-auto">Second item</div>
<div class="vr"></div>
<div class="bg-body-tertiary border">Third item</div>
<div class="p-2">Third item</div>
</div>
{{< /example >}}