mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
28d9aaf670
* Add z-index for .toast-container - Adds positioning and z-index to toast container so that it has a system-declared layer in relation to other components. - Updates docs to use the class better Fixes $34028 * Remove unnecessary z-index from docs examples
54 lines
1.2 KiB
SCSS
54 lines
1.2 KiB
SCSS
.toast {
|
|
width: $toast-max-width;
|
|
max-width: 100%;
|
|
@include font-size($toast-font-size);
|
|
color: $toast-color;
|
|
pointer-events: auto;
|
|
background-color: $toast-background-color;
|
|
background-clip: padding-box;
|
|
border: $toast-border-width solid $toast-border-color;
|
|
box-shadow: $toast-box-shadow;
|
|
@include border-radius($toast-border-radius);
|
|
|
|
&.showing {
|
|
opacity: 0;
|
|
}
|
|
|
|
&:not(.show) {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.toast-container {
|
|
position: absolute;
|
|
z-index: $zindex-toast;
|
|
width: max-content;
|
|
max-width: 100%;
|
|
pointer-events: none;
|
|
|
|
> :not(:last-child) {
|
|
margin-bottom: $toast-spacing;
|
|
}
|
|
}
|
|
|
|
.toast-header {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: $toast-padding-y $toast-padding-x;
|
|
color: $toast-header-color;
|
|
background-color: $toast-header-background-color;
|
|
background-clip: padding-box;
|
|
border-bottom: $toast-border-width solid $toast-header-border-color;
|
|
@include border-top-radius(subtract($toast-border-radius, $toast-border-width));
|
|
|
|
.btn-close {
|
|
margin-right: $toast-padding-x * -.5;
|
|
margin-left: $toast-padding-x;
|
|
}
|
|
}
|
|
|
|
.toast-body {
|
|
padding: $toast-padding-x; // apply to both vertical and horizontal
|
|
word-wrap: break-word;
|
|
}
|