Skip to content

Commit 3d998e3

Browse files
author
Federico Zivolo
committed
Theme now comes with SnackbarJS Material theme built-in
1 parent b00521d commit 3d998e3

1 file changed

Lines changed: 20 additions & 23 deletions

File tree

less/popups.less

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,41 +26,38 @@
2626
}
2727
}
2828

29-
// Support for toastr plugin (in material they are snackbars)
30-
// http://codeseven.github.io/toastr/
29+
// Support for SnackbarJS plugin
30+
// https://github.com/FezVrasta/snackbarjs
3131

3232
.snackbar {
33-
display: inline-block;
34-
position: fixed;
35-
z-index: 99999;
36-
left: 20px;
37-
bottom: 0;
38-
min-width: 288px;
39-
max-width: 568px;
40-
padding: 14px 15px;
41-
margin-bottom: 20px;
42-
33+
// Style
34+
background-color: #323232;
4335
color: @darkbg-text;
4436
font-size: 14px;
45-
background-color: #323232;
4637
border-radius: 2px;
4738
.shadow-z-1;
4839

49-
opacity: 0;
50-
-webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in;
51-
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in;
52-
40+
// Animation
41+
height: 0;
42+
-moz-transition: -moz-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, padding 0 linear 0.2s, height 0 linear 0.2s;
43+
-webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, padding 0 linear 0.2s, height 0 linear 0.2s;
44+
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, padding 0 linear 0.2s, height 0 linear 0.2s;
45+
-moz-transform: translateY(200%);
5346
-webkit-transform: translateY(200%);
5447
transform: translateY(200%);
55-
5648
}
5749

5850
.snackbar.snackbar-opened {
59-
opacity: 1;
51+
// Style
52+
padding: 14px 15px;
53+
margin-bottom: 20px;
54+
55+
// Animation
56+
height: auto;
57+
-moz-transition: -moz-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s;
58+
-webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s;
59+
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, height 0 linear 0.2s;
60+
-moz-transform: none;
6061
-webkit-transform: none;
6162
transform: none;
6263
}
63-
64-
.snackbar.toast {
65-
border-radius: 200px;
66-
}

0 commit comments

Comments
 (0)