This repository has been archived by the owner on Jun 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
220 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Toasts | ||
|
||
Push notifications to your visitors with a toast, a lightweight and easily customizable alert message. | ||
|
||
Toasts are lightweight notifications designed to mimic the push notifications that have been popularized by mobile and desktop operating systems. | ||
|
||
## Examples | ||
|
||
### Basic | ||
|
||
To encourage extensible and predictable toasts, we recommend a header and body. | ||
|
||
``` basic-toast-demo-xml | ||
<w class="toast"> | ||
<w class="toast-header"> | ||
<img class="rounded mr-2" /> | ||
<strong>LC Design</strong> | ||
<w class="toast-header-right"> | ||
<small class="text-muted">11 mins ago</small> | ||
<button class="ml-2 close" data-dismiss="toast">×</button> | ||
</w> | ||
</w> | ||
<text class="toast-body"> | ||
Hello, world! This is a toast message. | ||
</text> | ||
</w> | ||
``` | ||
|
||
### Translucent | ||
|
||
Toasts are slightly translucent, too, so they blend over whatever they might appear over. | ||
|
||
``` translucent-toast-demo-xml | ||
<w class="toast"> | ||
<w class="toast-header"> | ||
<img class="rounded mr-2" /> | ||
<strong>LC Design</strong> | ||
<w class="toast-header-right"> | ||
<small class="text-muted">11 mins ago</small> | ||
<button class="ml-2 close" data-dismiss="toast">×</button> | ||
</w> | ||
</w> | ||
<text class="toast-body"> | ||
Hello, world! This is a toast message. | ||
</text> | ||
</w> | ||
``` | ||
|
||
### Stacking | ||
|
||
When you have multiple toasts, we default to vertically stacking them in a readable manner. | ||
|
||
``` stacking-toast-demo-xml | ||
<w class="toast"> | ||
<w class="toast-header"> | ||
<img class="rounded mr-2" /> | ||
<strong>LC Design</strong> | ||
<w class="toast-header-right"> | ||
<small class="text-muted">just now</small> | ||
<button class="ml-2 close" data-dismiss="toast">×</button> | ||
</w> | ||
</w> | ||
<text class="toast-body"> | ||
See? Just like this. | ||
</text> | ||
</w> | ||
<w class="toast"> | ||
<w class="toast-header"> | ||
<img class="rounded mr-2" /> | ||
<strong>LC Design</strong> | ||
<w class="toast-header-right"> | ||
<small class="text-muted">2 seconds ago</small> | ||
<button class="ml-2 close" data-dismiss="toast">×</button> | ||
</w> | ||
</w> | ||
<text class="toast-body"> | ||
Heads up, toasts will stack automatically | ||
</text> | ||
</w> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
.toast { | ||
max-width: $toast-max-width; | ||
background-color: $toast-background-color; | ||
background-clip: padding-box; | ||
border: $toast-border-width solid $toast-border-color; | ||
box-shadow: $toast-box-shadow; | ||
margin-bottom: $toast-padding-x; | ||
opacity: 0; | ||
|
||
@include text { | ||
font-size: $toast-font-size; | ||
} | ||
|
||
@include border-radius($toast-border-radius); | ||
|
||
small, small { | ||
font-size: $toast-font-size * 0.8; | ||
} | ||
|
||
&:last-child { | ||
margin-bottom: 0; | ||
} | ||
|
||
&.showing { | ||
opacity: 1; | ||
} | ||
|
||
&.show { | ||
display: block; | ||
opacity: 1; | ||
} | ||
|
||
&.hide { | ||
display: none; | ||
} | ||
} | ||
|
||
.toast-header { | ||
@include text { | ||
color: $toast-header-color; | ||
} | ||
|
||
padding: $toast-padding-y $toast-padding-x; | ||
background-color: $toast-header-background-color; | ||
border-bottom: $toast-border-width solid $toast-header-border-color; | ||
} | ||
|
||
.toast-header-right { | ||
@include float-right; | ||
|
||
top: $toast-padding-y; | ||
right: $toast-padding-x; | ||
|
||
.close { | ||
top: -$toast-padding-y; | ||
font-size: $close-font-size; | ||
position: relative; | ||
} | ||
} | ||
|
||
.toast-body { | ||
padding: $toast-padding-x; // apply to both vertical and horizontal | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@import "functions"; | ||
@import "variables"; | ||
@import "mixins"; | ||
@import "reboot"; | ||
@import "font"; | ||
@import "iconfont"; | ||
@import "type"; | ||
@import "grid"; | ||
@import "alert"; | ||
@import "forms"; | ||
@import "nav"; | ||
@import "navbar"; | ||
@import "buttons"; | ||
@import "dropdown"; | ||
@import "list-group"; | ||
@import "close"; | ||
@import "modal"; | ||
@import "toasts"; | ||
@import "utilities"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
@content; | ||
} | ||
|
||
textview, .text { | ||
#{$text-elements}, .text { | ||
@content; | ||
} | ||
} |