-
Notifications
You must be signed in to change notification settings - Fork 0
/
snackbar.less
241 lines (197 loc) · 4.68 KB
/
snackbar.less
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
/*
Please note this CSS is currently in prototype form. We'll implement a cleaned up version in Web Starter Kit.
*/
.paper-snackbar {
transition-property: opacity, bottom, left, right, width, margin, border-radius;
transition-duration: 0.5s;
transition-timing-function: ease;
/*font-family: RobotoDraft;*/
font-size: 14px;
min-height: 14px;
background-color: #323232;
background-color: #0085a1;
position: fixed;
display: flex;
justify-content: space-between;
align-items: center;
color: white;
line-height: 22px;
padding: 18px 24px;
bottom: 0px;
opacity: 0;
}
@media (min-width: 640px) {
.paper-snackbar {
/*
Desktop:
Single-line snackbar height: 48 dp tall
Minimum width: 288 dp
Maximum width: 568 dp
2 dp rounded corner
Text: Roboto Regular 14 sp
Action button: Roboto Medium 14 sp, all-caps text
Default background fill: #323232 100%
*/
min-width: 288px;
max-width: 568px;
display: inline-flex;
border-radius: 2px;
margin: 24px;
bottom: -100px;
}
}
@media (max-width: 640px) {
.paper-snackbar {
/*
Mobile:
Single-line snackbar height: 48 dp
Multi-line snackbar height: 80 dp
Text: Roboto Regular 14 sp
Action button: Roboto Medium 14 sp, all-caps text
Default background fill: #323232 100%
*/
left: 0px;
right: 0px;
}
}
.paper-snackbar .action {
background: inherit;
display: inline-block;
border: none;
font-size: inherit;
text-transform: uppercase;
color: #ffeb3b;
margin: 0px 0px 0px 24px;
padding: 0px;
min-width: min-content;
outline: 0px;
}
/* Everything from here down is actually just for the demo - the material buttons and card, and various other pieces of styling */
/* Variables */
@blue: #4285f4;
@white: #fff;
@black: #000;
@gray: #ccc;
@button-width: 160px;
@top: 1000;
/* Buttons */
.paper-button {
position: relative;
padding: 4px 0;
margin: 1em;
width: @button-width;
overflow: hidden;
user-select: none;
color: @black;
text-transform: uppercase;
border-radius: 3px;
outline-color: @gray;
&:hover {
cursor: pointer;
}
// we don't leverage ripple
// .ripple {
// position: absolute;
// width: @button-width * 2;
// height: @button-width * 2;
// //background-color: rgba(@gray, 0.5);
// left: 0;
// top: 0;
// border-radius: 50%;
// margin-left: - @button-width;
// margin-top: - @button-width;
// transform: scaleX(0) scaleY(0);
// z-index: 9000;
// }
}
.paper-button button, .paper-button input[type="submit"] {
background: inherit;
border: none;
display: block;
width: 100%;
height: 100%;
/*font-family: 'Roboto';*/
font-size: 1em;
color: @black;
text-transform: uppercase;
}
.paper-button.colored, .paper-button.colored button {
color: @blue;
}
// .paper-button .ripple {
// background-color: rgba(@gray, 0.5);
// }
// .paper-button.raised-button.colored .ripple {
// background-color: rgba(@white, 0.5);
// }
// .paper-button.raised-button .ripple {
// background-color: rgba(@gray, 0.5);
// }
.paper-button.raised-button.colored {
background-color: @blue;
}
.paper-button .raised-button{
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
}
.paper-button.raised-button.colored{
background: #4285f4;
color: #fff;
}
.paper-button[disabled] {
background-color: #EAEAEA !important;
color: #A8A8A8 !important;
cursor: auto;
}
.paper-button:hover{
background-color: #EAEAEA;
}
.paper-button.raised-button.colored:hover{
background-color: #3367d6;
}
button.paper-button {
border:0;
/*font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;*/
font-size: 1em;
line-height: 25px;
background-color: @white;
}
.paper-button input[type="submit"] {
outline-color: @gray;
}
.paper-button.colored.raised-button input[type="submit"] {
color: @white;
}
/** Shadows **/
.paper-shadow-animated.paper-shadow {
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.paper-shadow-top-z-1 {
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.16);
}
.paper-shadow-bottom-z-1 {
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
}
.paper-shadow-top-z-2 {
box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
.paper-shadow-bottom-z-2 {
box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2);
}
.paper-shadow-top-z-3 {
box-shadow: 0 17px 50px 0 rgba(0, 0, 0, 0.19);
}
.paper-shadow-bottom-z-3 {
box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24);
}
.paper-shadow-top-z-4 {
box-shadow: 0 25px 55px 0 rgba(0, 0, 0, 0.21);
}
/** Card **/
.card {
background: white;
width: 300px;
height: 300px;
position: relative;
margin: 16px;
border-radius: 2px;
}