Skip to content

Commit

Permalink
fix(cards): card header padding top (#1449)
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Déramond <julien.deramond@orange.com>
  • Loading branch information
louismaximepiton and julien-deramond committed Dec 30, 2022
1 parent 20d8f0c commit 8dc7d8c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
5 changes: 3 additions & 2 deletions scss/_card.scss
Expand Up @@ -4,7 +4,8 @@

.card {
// scss-docs-start card-css-vars
--#{$prefix}card-spacer-y: #{$card-spacer-y};
--#{$prefix}card-spacer-top: #{$card-spacer-top}; // Boosted mod
--#{$prefix}card-spacer-bottom: #{$card-spacer-bottom}; // Boosted mod
--#{$prefix}card-spacer-x: #{$card-spacer-x};
--#{$prefix}card-title-spacer-y: #{$card-title-spacer-y};
--#{$prefix}card-border-width: #{$card-border-width};
Expand Down Expand Up @@ -69,7 +70,7 @@
// Enable `flex-grow: 1` for decks and groups so that card blocks take up
// as much space as possible, ensuring footers are aligned to the bottom.
flex: 1 1 auto;
padding: var(--#{$prefix}card-spacer-y) var(--#{$prefix}card-spacer-x);
padding: var(--#{$prefix}card-spacer-top) var(--#{$prefix}card-spacer-x) var(--#{$prefix}card-spacer-bottom); // Boosted mod
color: var(--#{$prefix}card-color);
}

Expand Down
8 changes: 6 additions & 2 deletions scss/_variables.scss
Expand Up @@ -1530,15 +1530,19 @@ $placeholder-opacity-min: .2 !default;
// Cards

// scss-docs-start card-variables
$card-spacer-y: $spacer !default;
$card-spacer-top: $spacer * .75 !default; // Boosted mod
$card-spacer-bottom: $spacer !default; // Boosted mod
// fusv-disable
$card-spacer-y: $spacer !default; // Deprecated in v5.2.3
// fusv-enable
$card-spacer-x: $spacer !default;
$card-title-spacer-y: $spacer * .5 !default;
$card-border-width: $border-width !default;
$card-border-color: var(--#{$prefix}border-color-translucent) !default;
$card-border-radius: $border-radius !default;
$card-box-shadow: null !default;
$card-inner-border-radius: subtract($card-border-radius, $card-border-width) !default;
$card-cap-padding-y: $card-spacer-y * .5 !default;
$card-cap-padding-y: $card-spacer-bottom * .5 !default; // Boosted mod
$card-cap-padding-x: $card-spacer-x !default;
$card-cap-bg: $black !default;
$card-cap-color: $white !default;
Expand Down
6 changes: 6 additions & 0 deletions site/content/docs/5.2/migration.md
Expand Up @@ -137,6 +137,7 @@ If you need more details about the changes, please refer to the [v5.2.3 release]
<ul>
<li><code>--bs-accordion-body-padding-x</code></li>
<li><code>--bs-accordion-body-padding-y</code></li>
<li><code>--bs-card-spacer-y</code></li>
<li><code>--bs-dropdown-toggle-bg</code></li>
<li><code>--bs-dropdown-toggle-border-color</code></li>
<li><code>--bs-dropdown-toggle-color</code></li>
Expand All @@ -153,6 +154,8 @@ If you need more details about the changes, please refer to the [v5.2.3 release]
<li><code>--bs-accordion-body-padding-end</code></li>
<li><code>--bs-accordion-body-padding-start</code></li>
<li><code>--bs-accordion-body-padding-top</code></li>
<li><code>--bs-card-spacer-bottom</code></li>
<li><code>--bs-card-spacer-top</code></li>
<li><code>--bs-dropdown-line-height</code></li>
<li><code>--bs-focus-visible-inner-color</code></li>
<li><code>--bs-focus-visible-outer-color</code></li>
Expand All @@ -170,6 +173,7 @@ If you need more details about the changes, please refer to the [v5.2.3 release]
<li><code>$accordion-body-padding-x</code></li>
<li><code>$accordion-body-padding-y</code></li>
<li><code>$btn-close-focus-shadow</code></li>
<li><code>$card-spacer-y</code></li>
<li><code>$form-range-thumb-active-border</code></li>
<li><code>$form-star-focus-box-shadow</code></li>
<li><code>$form-star-focus-color</code></li>
Expand All @@ -188,6 +192,8 @@ If you need more details about the changes, please refer to the [v5.2.3 release]
<li><code>$accordion-body-padding-end</code></li>
<li><code>$accordion-body-padding-start</code></li>
<li><code>$accordion-body-padding-top</code></li>
<li><code>$card-spacer-bottom</code></li>
<li><code>$card-spacer-top</code></li>
<li><code>$focus-visible-inner-color</code></li>
<li><code>$focus-visible-inner-color-dark</code></li>
<li><code>$focus-visible-inner-width</code></li>
Expand Down

0 comments on commit 8dc7d8c

Please sign in to comment.