Skip to content

Commit

Permalink
Fix some instances of lazy Sass math when multiplying new CSS var bas…
Browse files Browse the repository at this point in the history
…ed border-width
  • Loading branch information
mdo committed Mar 11, 2022
1 parent 05c6e7d commit 63145c8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scss/_list-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
border-top-width: 0;

&.active {
margin-top: -$list-group-border-width;
margin-top: calc($list-group-border-width * -1); // stylelint-disable-line function-disallowed-list
border-top-width: $list-group-border-width;
}
}
Expand Down Expand Up @@ -125,7 +125,7 @@
border-left-width: 0;

&.active {
margin-left: -$list-group-border-width;
margin-left: calc($list-group-border-width * -1); // stylelint-disable-line function-disallowed-list
border-left-width: $list-group-border-width;
}
}
Expand Down
4 changes: 2 additions & 2 deletions scss/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color;

.nav-link {
margin-bottom: -$nav-tabs-border-width;
margin-bottom: calc($nav-tabs-border-width * -1); // stylelint-disable-line function-disallowed-list
background: none;
border: $nav-tabs-border-width solid transparent;
@include border-top-radius($nav-tabs-border-radius);
Expand Down Expand Up @@ -70,7 +70,7 @@

.dropdown-menu {
// Make dropdown border overlap tab border
margin-top: -$nav-tabs-border-width;
margin-top: calc($nav-tabs-border-width * -1); // stylelint-disable-line function-disallowed-list
// Remove the top rounded corners here since there is a hard edge above the menu
@include border-top-radius(0);
}
Expand Down
2 changes: 1 addition & 1 deletion scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ $pagination-color: $link-color !default;
$pagination-bg: $white !default;
$pagination-border-radius: $border-radius !default;
$pagination-border-width: var(--#{$variable-prefix}border-width) !default;
$pagination-margin-start: -$pagination-border-width !default;
$pagination-margin-start: calc($pagination-border-width * -1) !default; // stylelint-disable-line function-disallowed-list
$pagination-border-color: $gray-300 !default;

$pagination-focus-color: $link-hover-color !default;
Expand Down

0 comments on commit 63145c8

Please sign in to comment.