Skip to content

Commit

Permalink
e60002b1fc9bb8a735b3161a3e5d29fbb6a0cbdc
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-deramond committed Feb 20, 2023
1 parent b86eb04 commit 2309319
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions scss/_close.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile

.btn-close {
// scss-docs-start btn-close-css-vars
// scss-docs-start close-css-vars
--#{$prefix}btn-close-color: #{$btn-close-color};
--#{$prefix}btn-close-bg: #{$btn-close-bg}; // Boosted mod: don't use escape-svg()
// Boosted mod: no --#{$prefix}btn-close-opacity
Expand All @@ -20,7 +20,7 @@
--#{$prefix}btn-close-active-color: #{$btn-close-active-color}; // Boosted mod
--#{$prefix}btn-close-active-border-color: #{$btn-close-active-border-color}; // Boosted mod
--#{$prefix}btn-close-disabled-color: #{$btn-close-disabled-color}; // Boosted mod
// scss-docs-end btn-close-css-vars
// scss-docs-end close-css-vars

// Boosted mod: no box-sizing, width nor height
padding: var(--#{$prefix}btn-close-padding); // Boosted mod
Expand Down
6 changes: 2 additions & 4 deletions site/content/docs/5.3/components/close-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,13 @@ Close buttons can also be created without `.btn-close` to reduce the size of you

## CSS

<!-- Boosted mod: CSS var -->
### Variables

{{< added-in "5.2.1" >}}

As part of Boosted’s evolving CSS variables approach, close buttons now use local CSS variables on `.btn-close` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too.
As part of Boosted’s evolving CSS variables approach, close button now use local CSS variables on `.btn-close` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too.

{{< scss-docs name="btn-close-css-vars" file="scss/_close.scss" >}}
{{< scss-docs name="close-css-vars" file="scss/_close.scss" >}}

Customization through CSS variables can be seen on the `.btn-close-white` modifier class where we override specific values without adding duplicate CSS selectors.

Expand All @@ -73,4 +72,3 @@ Variables for all close buttons:
Variables for the [dark close button](#dark-variant):

{{< scss-docs name="close-white-variables" file="scss/_variables.scss" >}}
<!-- End mod -->

0 comments on commit 2309319

Please sign in to comment.