Skip to content

Commit

Permalink
Fixes #1406 - ClayCSS Mixin clay-card-type-asset map key `aspect-ra…
Browse files Browse the repository at this point in the history
…tio-border-bottom-width` to variable `$aspect-ratio-border-bottom-width` and map key `aspect-ratio-border-width` to variable `$aspect-ratio-border-width`

Fixes #1406 - ClayCSS Mixin `clay-card-type-asset` deprecate `aspect-ratio-border-bottom-width`
  • Loading branch information
pat270 committed Dec 18, 2018
1 parent 9e9e529 commit e790360
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/clay-css/src/scss/mixins/_cards.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@

$aspect-ratio-border-color: setter(map-get($map, aspect-ratio-border-color), $card-border-color);
$aspect-ratio-border-style: setter(map-get($map, aspect-ratio-border-style), solid);
$aspect-ratio-border-width: setter(map-get($map, aspect-ratio-border-bottom-width), 0 0 0.0625rem 0); // 0 0 1px 0

// The Sass map key name `aspect-ratio-border-bottom-width is deprecated as of v2.5.1 use `aspect-ratio-border-width` instead
$aspect-ratio-border-bottom-width: setter(map-get($map, aspect-ratio-border-bottom-width), 0 0 0.0625rem 0); // 0 0 1px 0

$aspect-ratio-border-width: map-get($map, aspect-ratio-border-width);
$aspect-ratio-horizontal: setter(map-get($map, aspect-ratio-horizontal), 16);
$aspect-ratio-vertical: setter(map-get($map, aspect-ratio-vertical), 9);

Expand Down Expand Up @@ -31,6 +35,11 @@
border-style: $aspect-ratio-border-style;
border-width: $aspect-ratio-border-width;

@if not $aspect-ratio-border-width {
// `$aspect-ratio-border-bottom-width is deprecated as of v2.5.1 use `$aspect-ratio-border-width` instead
border-width: $aspect-ratio-border-bottom-width;
}

@include clay-aspect-ratio($aspect-ratio-horizontal, $aspect-ratio-vertical);

.custom-control label,
Expand Down

0 comments on commit e790360

Please sign in to comment.