Skip to content

Commit

Permalink
fix(toasts): account for iconography
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmatthew committed Jun 4, 2021
1 parent 7ab3d0b commit 8b78aea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
13 changes: 5 additions & 8 deletions scss/_toasts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
.btn-close {
width: auto;
height: auto;
padding: 0;
font-weight: 300;
text-decoration: underline;
background: transparent;
Expand All @@ -36,15 +37,11 @@
}
}

.toast-body {
.toast > *:only-child {
align-items: center;
padding: $toast-padding-y $toast-padding-x;
padding-right: math.div($toast-padding-x, 2);

&:only-child {
padding-right: $toast-padding-x;
}
}

.toast-body + .btn-close {
margin-right: $toast-padding-x;
.toast-body:not(:only-child) {
padding: 0 math.div($toast-padding-x, 2);
}
1 change: 1 addition & 0 deletions src/docs/_includes/toasts.njk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
>
<div class="toast align-items-center" data-bs-autohide="false">
<div class="d-flex">
<i class="fal fa-spinner-third fa-spin fa-fw"></i>
<div class="toast-body">Hello, world! This is a toast message.</div>
<button
type="button"
Expand Down

0 comments on commit 8b78aea

Please sign in to comment.