Skip to content

Commit

Permalink
New Sass variable to change vertical rule width
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-deramond authored and mdo committed Jul 17, 2023
1 parent 8c13516 commit 6a9b9af
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,10 @@ $hr-border-color: null !default; // Allows for inherited colors
$hr-border-width: var(--#{$prefix}border-width) !default;
$hr-opacity: .25 !default;

// scss-docs-start vr-variables
$vr-border-width: var(--#{$prefix}border-width) !default;
// scss-docs-end vr-variables

$legend-margin-bottom: .5rem !default;
$legend-font-size: 1.5rem !default;
$legend-font-weight: null !default;
Expand Down
2 changes: 1 addition & 1 deletion scss/helpers/_vr.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.vr {
display: inline-block;
align-self: stretch;
width: 1px;
width: $vr-border-width;
min-height: 1em;
background-color: currentcolor;
opacity: $hr-opacity;
Expand Down
8 changes: 8 additions & 0 deletions site/content/docs/5.3/helpers/vertical-rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,11 @@ They can also be used in [stacks]({{< docsref "/helpers/stacks" >}}):
<div class="p-2">Third item</div>
</div>
{{< /example >}}

## CSS

### Sass variables

Customize the vertical rule Sass variable to change its width.

{{< scss-docs name="vr-variables" file="scss/_variables.scss" >}}

0 comments on commit 6a9b9af

Please sign in to comment.