mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-28 15:50:01 +02:00
Add new toasts component
This commit is contained in:
29
scss/_toasts.scss
Normal file
29
scss/_toasts.scss
Normal file
@@ -0,0 +1,29 @@
|
||||
.toast {
|
||||
max-width: $toast-max-width;
|
||||
overflow: hidden; // cheap rounded corners on nested items
|
||||
font-size: $toast-font-size; // knock it down to 14px
|
||||
background-color: $toast-background-color;
|
||||
background-clip: padding-box;
|
||||
border: $toast-border-width solid $toast-border-color;
|
||||
border-radius: $toast-border-radius;
|
||||
box-shadow: $toast-box-shadow;
|
||||
backdrop-filter: blur(10px);
|
||||
|
||||
+ .toast {
|
||||
margin-top: $toast-padding-x;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.toast-body {
|
||||
padding: $toast-padding-x; // apply to both vertical and horizontal
|
||||
}
|
@@ -3,7 +3,6 @@
|
||||
// Variables should follow the `$component-state-property-size` formula for
|
||||
// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs.
|
||||
|
||||
|
||||
// Color system
|
||||
|
||||
$white: #fff !default;
|
||||
@@ -860,6 +859,22 @@ $popover-arrow-color: $popover-bg !default;
|
||||
$popover-arrow-outer-color: fade-in($popover-border-color, .05) !default;
|
||||
|
||||
|
||||
// Toasts
|
||||
$toast-max-width: 350px !default;
|
||||
$toast-padding-x: .75rem !default;
|
||||
$toast-padding-y: .25rem !default;
|
||||
$toast-font-size: .875rem !default;
|
||||
$toast-background-color: rgba($white, .85) !default;
|
||||
$toast-border-width: 1px !default;
|
||||
$toast-border-color: rgba(0,0,0,.1) !default;
|
||||
$toast-border-radius: .25rem !default;
|
||||
$toast-box-shadow: 0 .25rem .75rem rgba($black, .1) !default;
|
||||
|
||||
$toast-header-color: $gray-600 !default;
|
||||
$toast-header-background-color: rgba($white, .85) !default;
|
||||
$toast-header-border-color: rgba(0, 0, 0, .05) !default;
|
||||
|
||||
|
||||
// Badges
|
||||
|
||||
$badge-font-size: 75% !default;
|
||||
|
1
scss/bootstrap.scss
vendored
1
scss/bootstrap.scss
vendored
@@ -34,6 +34,7 @@
|
||||
@import "media";
|
||||
@import "list-group";
|
||||
@import "close";
|
||||
@import "toasts";
|
||||
@import "modal";
|
||||
@import "tooltip";
|
||||
@import "popover";
|
||||
|
Reference in New Issue
Block a user