From aee169d19288d78330be2df0960ea8924353f84f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 22 Jun 2021 22:22:02 -0700 Subject: Split .vr from stacks as a new helper --- site/content/docs/5.0/helpers/stacks.md | 4 +-- site/content/docs/5.0/helpers/vertical-rule.md | 44 ++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 site/content/docs/5.0/helpers/vertical-rule.md (limited to 'site/content/docs') diff --git a/site/content/docs/5.0/helpers/stacks.md b/site/content/docs/5.0/helpers/stacks.md index 41c0ac546..a93a80046 100644 --- a/site/content/docs/5.0/helpers/stacks.md +++ b/site/content/docs/5.0/helpers/stacks.md @@ -42,9 +42,7 @@ Using horizontal margin utilities like `.ms-auto` as spacers: {{< /example >}} -
-
-
+And with [vertical rules]({{< docsref "/helpers/vertical-rule" >}}): {{< example >}}
diff --git a/site/content/docs/5.0/helpers/vertical-rule.md b/site/content/docs/5.0/helpers/vertical-rule.md new file mode 100644 index 000000000..8d0d6141f --- /dev/null +++ b/site/content/docs/5.0/helpers/vertical-rule.md @@ -0,0 +1,44 @@ +--- +layout: docs +title: Vertical rule +description: Use the custom vertical rule helper to create vertical dividers like the `
` element. +group: helpers +toc: true +--- + +## How it works + +Vertical rules are inspired by the `
` element, allowing you to create vertical dividers in common layouts. They're styled just like `
` elements: + +- They're `1px` wide +- They have `min-height` of `1em` +- Their color is set via `currentColor` and `opacity` + +Customize them with additional styles as needed. + +## Example + +{{< example >}} +
+{{< /example >}} + +Vertical rules scale their height in flex layouts: + +{{< example >}} +
+
+
+{{< /example >}} + +## With stacks + +They can also be used in [stacks]({{< docsref "/helpers/stacks" >}}): + +{{< example >}} +
+
First item
+
Second item
+
+
Third item
+
+{{< /example >}} -- cgit v1.2.3