mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-23 20:54:22 +01:00
78 lines
3.0 KiB
SCSS
78 lines
3.0 KiB
SCSS
@use "mixins/border-radius";
|
|
@use "variables";
|
|
@use "vendor/rfs";
|
|
|
|
.toast {
|
|
// scss-docs-start toast-css-vars
|
|
--#{variables.$prefix}toast-zindex: #{variables.$zindex-toast};
|
|
--#{variables.$prefix}toast-padding-x: #{variables.$toast-padding-x};
|
|
--#{variables.$prefix}toast-padding-y: #{variables.$toast-padding-y};
|
|
--#{variables.$prefix}toast-spacing: #{variables.$toast-spacing};
|
|
--#{variables.$prefix}toast-max-width: #{variables.$toast-max-width};
|
|
@include rfs.rfs(variables.$toast-font-size, --#{variables.$prefix}toast-font-size);
|
|
--#{variables.$prefix}toast-color: #{variables.$toast-color};
|
|
--#{variables.$prefix}toast-bg: #{variables.$toast-background-color};
|
|
--#{variables.$prefix}toast-border-width: #{variables.$toast-border-width};
|
|
--#{variables.$prefix}toast-border-color: #{variables.$toast-border-color};
|
|
--#{variables.$prefix}toast-border-radius: #{variables.$toast-border-radius};
|
|
--#{variables.$prefix}toast-box-shadow: #{variables.$toast-box-shadow};
|
|
--#{variables.$prefix}toast-header-color: #{variables.$toast-header-color};
|
|
--#{variables.$prefix}toast-header-bg: #{variables.$toast-header-background-color};
|
|
--#{variables.$prefix}toast-header-border-color: #{variables.$toast-header-border-color};
|
|
// scss-docs-end toast-css-vars
|
|
|
|
width: var(--#{variables.$prefix}toast-max-width);
|
|
max-width: 100%;
|
|
@include rfs.font-size(var(--#{variables.$prefix}toast-font-size));
|
|
color: var(--#{variables.$prefix}toast-color);
|
|
pointer-events: auto;
|
|
background-color: var(--#{variables.$prefix}toast-bg);
|
|
background-clip: padding-box;
|
|
border: var(--#{variables.$prefix}toast-border-width) solid var(--#{variables.$prefix}toast-border-color);
|
|
box-shadow: var(--#{variables.$prefix}toast-box-shadow);
|
|
@include border-radius.border-radius(var(--#{variables.$prefix}toast-border-radius));
|
|
|
|
&.showing {
|
|
opacity: 0;
|
|
}
|
|
|
|
&:not(.show) {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.toast-container {
|
|
--#{variables.$prefix}toast-zindex: #{variables.$zindex-toast};
|
|
|
|
position: absolute;
|
|
z-index: var(--#{variables.$prefix}toast-zindex);
|
|
width: max-content;
|
|
max-width: 100%;
|
|
pointer-events: none;
|
|
|
|
> :not(:last-child) {
|
|
margin-bottom: var(--#{variables.$prefix}toast-spacing);
|
|
}
|
|
}
|
|
|
|
.toast-header {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: var(--#{variables.$prefix}toast-padding-y) var(--#{variables.$prefix}toast-padding-x);
|
|
color: var(--#{variables.$prefix}toast-header-color);
|
|
background-color: var(--#{variables.$prefix}toast-header-bg);
|
|
background-clip: padding-box;
|
|
border-bottom: var(--#{variables.$prefix}toast-border-width) solid var(--#{variables.$prefix}toast-header-border-color);
|
|
@include border-radius.border-top-radius(calc(var(--#{variables.$prefix}toast-border-radius) - var(--#{variables.$prefix}toast-border-width)));
|
|
|
|
.btn-close {
|
|
margin-right: calc(-.5 * var(--#{variables.$prefix}toast-padding-x)); // stylelint-disable-line function-disallowed-list
|
|
margin-left: var(--#{variables.$prefix}toast-padding-x);
|
|
}
|
|
}
|
|
|
|
.toast-body {
|
|
padding: var(--#{variables.$prefix}toast-padding-x);
|
|
word-wrap: break-word;
|
|
}
|