-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathmaterial-shadows.styl
90 lines (73 loc) · 2.2 KB
/
material-shadows.styl
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
//
// Name: Material Shadows
// Description: Mixins for Material Design Shadows.
// Version: 3.0.1
//
// Author: Denis Malinochkin
// Git: https://github.com/mrmlnc/material-shadows
//
// twitter: @mrmlnc
//
// ------------------------------------
// Mixins
// ------------------------------------
z-depth-transition()
transition: box-shadow .28s cubic-bezier(.4, 0, .2, 1)
z-depth-focus()
box-shadow: 0 0 8px rgba(0, 0, 0, .18), 0 8px 16px rgba(0, 0, 0, .36)
z-depth-2dp()
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14),
0 1px 5px 0 rgba(0, 0, 0, .12),
0 3px 1px -2px rgba(0, 0, 0, .2)
z-depth-3dp()
box-shadow: 0 3px 4px 0 rgba(0, 0, 0, .14),
0 1px 8px 0 rgba(0, 0, 0, .12),
0 3px 3px -2px rgba(0, 0, 0, .4)
z-depth-4dp()
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, .14),
0 1px 10px 0 rgba(0, 0, 0, .12),
0 2px 4px -1px rgba(0, 0, 0, .4)
z-depth-6dp()
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, .14),
0 1px 18px 0 rgba(0, 0, 0, .12),
0 3px 5px -1px rgba(0, 0, 0, .4)
z-depth-8dp()
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, .14),
0 3px 14px 2px rgba(0, 0, 0, .12),
0 5px 5px -3px rgba(0, 0, 0, .4)
z-depth-16dp()
box-shadow: 0 16px 24px 2px rgba(0, 0, 0, .14),
0 6px 30px 5px rgba(0, 0, 0, .12),
0 8px 10px -5px rgba(0, 0, 0, .4)
z-depth-24dp()
box-shadow: 0 9px 46px 8px rgba(0, 0, 0, .14),
0 24px 38px 3px rgba(0, 0, 0, .12),
0 11px 15px -7px rgba(0, 0, 0, .4)
z-depth($dp = 2)
if $dp == 2
z-depth-2dp()
else if $dp == 3
z-depth-3dp()
else if $dp == 4
z-depth-4dp()
else if $dp == 6
z-depth-6dp()
else if $dp == 8
z-depth-8dp()
else if $dp == 16
z-depth-16dp()
else if $dp == 24
z-depth-24dp()
// Class generator
// ------------------------------------
z-depth-classes($transition = false, $focus = false)
if $transition == true
&-transition
z-depth-transition()
if $focus == true
&-focus
z-depth-focus()
// The available values for the shadow depth
for $depth in 2 3 4 6 8 16 24
&-{$depth}dp
z-depth($depth)