Skip to content

Commit 0561821

Browse files
author
Federico Zivolo
committed
Added support for Toastr.
1 parent 89058f3 commit 0561821

3 files changed

Lines changed: 58 additions & 0 deletions

File tree

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,16 @@ Remember to use the proper HTML markup to get radio and checkboxes styled correc
6161
Option one is this
6262
</label>
6363
</div>
64+
65+
# Plugins
6466

67+
Material Design for Bootstrap comes with styling support for various Bootstrap plugins, at the moment only one plugin is supported but others will come:
68+
69+
### Toastr
70+
71+
Create snackbars and toasts with Toastr plugin, the default toast style is the squared one (snackbar style), if you like to use the rounded style (toast style) please add the `rounded` class to the `positionClass` option of Toastr.
72+
73+
![toastr](screenshots/toastr-preview.jpg)
6574

6675
# Compatibility
6776

popups.less

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// main: material.less
2+
3+
.popover, .tooltip-inner {
4+
background: #323232;
5+
color: #FFF;
6+
border-radius: 2px;
7+
8+
}
9+
10+
.tooltip, .tooltip.in {
11+
opacity: 1;
12+
}
13+
14+
.popover, .tooltip {
15+
&.left .arrow:after, &.left .tooltip-arrow {
16+
border-left-color: #323232;
17+
}
18+
&.right .arrow:after, &.right .tooltip-arrow {
19+
border-right-color: #323232;
20+
}
21+
&.top .arrow:after, &.top .tooltip-arrow {
22+
border-top-color: #323232;
23+
}
24+
&.bottom .arrow:after, &.bottom .tooltip-arrow {
25+
border-bottom-color: #323232;
26+
}
27+
}
28+
29+
// Support for toastr plugin (in material they are snackbars)
30+
// http://codeseven.github.io/toastr/
31+
32+
#toast-container > div {
33+
background-color: #323232;
34+
.shadow-z-1;
35+
border-radius: 2px;
36+
opacity: 1;
37+
color: @darkbg-text;
38+
}
39+
.toast-close-button:hover, .toast-close-button:focus {
40+
color: @darkbg-text;
41+
opacity: 1;
42+
}
43+
#toast-container.toast-top-full-width > div, #toast-container.toast-bottom-full-width > div {
44+
width: 100%;
45+
border-radius: 0;
46+
}
47+
#toast-container.rounded > div {
48+
border-radius: 200px;
49+
}

screenshots/toastr-preview.jpg

11.2 KB
Loading

0 commit comments

Comments
 (0)