2017-07-04 01:09:28 +02:00
|
|
|
.toast {
|
2022-03-17 22:48:36 +01:00
|
|
|
// scss-docs-start toast-css-vars
|
2022-08-24 15:42:02 +02:00
|
|
|
--#{$prefix}toast-zindex: #{$zindex-toast};
|
2022-03-17 22:48:36 +01:00
|
|
|
--#{$prefix}toast-padding-x: #{$toast-padding-x};
|
|
|
|
--#{$prefix}toast-padding-y: #{$toast-padding-y};
|
2022-04-11 11:59:40 +02:00
|
|
|
--#{$prefix}toast-spacing: #{$toast-spacing};
|
2022-03-17 22:48:36 +01:00
|
|
|
--#{$prefix}toast-max-width: #{$toast-max-width};
|
|
|
|
@include rfs($toast-font-size, --#{$prefix}toast-font-size);
|
2022-05-23 04:24:08 +02:00
|
|
|
--#{$prefix}toast-color: #{$toast-color};
|
2022-03-17 22:48:36 +01:00
|
|
|
--#{$prefix}toast-bg: #{$toast-background-color};
|
|
|
|
--#{$prefix}toast-border-width: #{$toast-border-width};
|
|
|
|
--#{$prefix}toast-border-color: #{$toast-border-color};
|
|
|
|
--#{$prefix}toast-border-radius: #{$toast-border-radius};
|
|
|
|
--#{$prefix}toast-box-shadow: #{$toast-box-shadow};
|
|
|
|
--#{$prefix}toast-header-color: #{$toast-header-color};
|
|
|
|
--#{$prefix}toast-header-bg: #{$toast-header-background-color};
|
|
|
|
--#{$prefix}toast-header-border-color: #{$toast-header-border-color};
|
|
|
|
// scss-docs-end toast-css-vars
|
|
|
|
|
|
|
|
width: var(--#{$prefix}toast-max-width);
|
2020-11-29 15:22:15 +01:00
|
|
|
max-width: 100%;
|
2022-04-11 11:59:40 +02:00
|
|
|
@include font-size(var(--#{$prefix}toast-font-size));
|
2022-03-17 22:48:36 +01:00
|
|
|
color: var(--#{$prefix}toast-color);
|
2020-11-29 15:22:15 +01:00
|
|
|
pointer-events: auto;
|
2022-03-17 22:48:36 +01:00
|
|
|
background-color: var(--#{$prefix}toast-bg);
|
2017-07-04 01:09:28 +02:00
|
|
|
background-clip: padding-box;
|
2022-03-17 22:48:36 +01:00
|
|
|
border: var(--#{$prefix}toast-border-width) solid var(--#{$prefix}toast-border-color);
|
|
|
|
box-shadow: var(--#{$prefix}toast-box-shadow);
|
|
|
|
@include border-radius(var(--#{$prefix}toast-border-radius));
|
2017-07-04 01:09:28 +02:00
|
|
|
|
2021-07-22 17:13:13 +02:00
|
|
|
&.showing {
|
2020-11-29 15:22:15 +01:00
|
|
|
opacity: 0;
|
2017-07-04 01:09:28 +02:00
|
|
|
}
|
|
|
|
|
2021-07-22 17:13:13 +02:00
|
|
|
&:not(.show) {
|
2020-11-29 15:22:15 +01:00
|
|
|
display: none;
|
2018-12-06 13:53:01 +01:00
|
|
|
}
|
2020-11-29 15:22:15 +01:00
|
|
|
}
|
2018-12-06 13:53:01 +01:00
|
|
|
|
2020-11-29 15:22:15 +01:00
|
|
|
.toast-container {
|
2022-09-10 00:07:16 +02:00
|
|
|
--#{$prefix}toast-zindex: #{$zindex-toast};
|
|
|
|
|
2022-02-25 17:49:02 +01:00
|
|
|
position: absolute;
|
2022-08-24 15:42:02 +02:00
|
|
|
z-index: var(--#{$prefix}toast-zindex);
|
2020-11-29 15:22:15 +01:00
|
|
|
width: max-content;
|
|
|
|
max-width: 100%;
|
|
|
|
pointer-events: none;
|
2018-12-06 13:53:01 +01:00
|
|
|
|
2020-11-29 15:22:15 +01:00
|
|
|
> :not(:last-child) {
|
2022-04-11 11:59:40 +02:00
|
|
|
margin-bottom: var(--#{$prefix}toast-spacing);
|
2018-09-19 07:00:22 +02:00
|
|
|
}
|
2018-08-23 18:31:25 +02:00
|
|
|
}
|
|
|
|
|
2017-07-04 01:09:28 +02:00
|
|
|
.toast-header {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2022-03-17 22:48:36 +01:00
|
|
|
padding: var(--#{$prefix}toast-padding-y) var(--#{$prefix}toast-padding-x);
|
|
|
|
color: var(--#{$prefix}toast-header-color);
|
|
|
|
background-color: var(--#{$prefix}toast-header-bg);
|
2017-07-04 01:09:28 +02:00
|
|
|
background-clip: padding-box;
|
2022-03-17 22:48:36 +01:00
|
|
|
border-bottom: var(--#{$prefix}toast-border-width) solid var(--#{$prefix}toast-header-border-color);
|
|
|
|
@include border-top-radius(calc(var(--#{$prefix}toast-border-radius) - var(--#{$prefix}toast-border-width)));
|
2020-09-14 04:47:05 +02:00
|
|
|
|
|
|
|
.btn-close {
|
2022-09-03 09:09:07 +02:00
|
|
|
margin-right: calc(-.5 * var(--#{$prefix}toast-padding-x)); // stylelint-disable-line function-disallowed-list
|
2022-03-17 22:48:36 +01:00
|
|
|
margin-left: var(--#{$prefix}toast-padding-x);
|
2020-09-14 04:47:05 +02:00
|
|
|
}
|
2017-07-04 01:09:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.toast-body {
|
2022-03-17 22:48:36 +01:00
|
|
|
padding: var(--#{$prefix}toast-padding-x);
|
2021-01-13 18:21:57 +01:00
|
|
|
word-wrap: break-word;
|
2017-07-04 01:09:28 +02:00
|
|
|
}
|