Skip to content

Commit

Permalink
fix(styles): fixed an issue where a title in a cvi-toast could overla…
Browse files Browse the repository at this point in the history
…p with a close button
  • Loading branch information
Aleksandr Beliaev committed Oct 5, 2023
1 parent 45a0abf commit b008ac4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions libs/styles/src/lib/scss/components/_toast.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
@mixin cvi-toast($base: &) {
--comment: 'A toast aka floating notification';

--padding: var(--cvi-spacing-haapsalu);
--close-button-size: 16px;

position: relative;
width: 350px;
overflow: hidden;
padding: var(--cvi-spacing-haapsalu);
padding: var(--padding);
margin-bottom: var(--cvi-spacing-paldiski);
border-radius: var(--cvi-radius-m);
color: var(--cvi-color-black-coral-18);
Expand All @@ -28,8 +31,8 @@

#{$base}__icon {
display: block;
width: 16px;
height: 16px;
width: var(--close-button-size);
height: var(--close-button-size);
}

#{$base}--appearance-success {
Expand Down Expand Up @@ -71,6 +74,7 @@
#{$base}__title {
display: flex;
align-items: center;
margin-right: calc(var(--close-button-size) + var(--cvi-spacing-rapla));
}

#{$base}__title-text {
Expand All @@ -82,8 +86,8 @@

#{$base}__close-button {
position: absolute;
top: 20px;
right: 20px;
top: var(--padding);
right: var(--padding);
cursor: pointer;
}

Expand Down

0 comments on commit b008ac4

Please sign in to comment.