-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathshadow-transition-buttons.scss
118 lines (111 loc) · 2.59 KB
/
shadow-transition-buttons.scss
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
//shadow bottom
.shadowButton1 {
box-shadow: 0 0 1px $light-gray;
transition: box-shadow 0.3s ease;
&:hover, &:focus, &:active {
box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.5);
cursor: pointer;
}
}
//shadow sides
.shadowButton2 {
box-shadow: 0 0 1px $light-gray;
transition: box-shadow 0.3s ease;
&:hover, &:focus, &:active {
box-shadow: 0 2px 2px 2px rgba(0, 0, 0, 0.5);
cursor: pointer;
}
}
//grow shadow
.shadowButton3 {
box-shadow: 0 0 1px $light-gray;
transition-duration: 0.3s;
transition-property: box-shadow, transform;
&:hover, &:focus, &:active {
box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.5);
cursor: pointer;
transform: scale(1.1);
}
}
//float shadow
.shadowButton4 {
box-shadow: 0 0 1px $light-gray;
position: relative;
transition: transform 0.3s ease;
&:before {
background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 80%);
content: '';
height: 10px;
left: 5%;
opacity: 0;
position: absolute;
top: 100%;
transition-duration: 0.3s;
transition-property: transform, opacity;
width: 90%;
}
&:hover, &:focus, &:active {
cursor: pointer;
transform: translateY(-5px);
&:before {
opacity: 1;
transform: translateY(5px);
}
}
}
//glow
.shadowButton5 {
box-shadow: 0 0 1px $light-gray;
transition: box-shadow 0.3s ease;
&:hover, &:focus, &:active {
box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
cursor: pointer;
}
}
//shadow radial
.shadowButton6 {
box-shadow: 0 0 1px $light-gray;
position: relative;
&:before, &:after {
content: '';
height: 5px;
left: 0;
opacity: 0;
position: absolute;
transition: opacity 0.3s ease;
width: 100%;
}
&:before {
background: radial-gradient(ellipse at 50% 150%, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 80%);
bottom: 100%;
}
&:after {
background: radial-gradient(ellipse at 50% -50%, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 80%);
top: 100%;
}
&:hover, &:focus, &:active {
cursor: pointer;
&:before, &:after {
opacity: 1;
}
}
}
//shadow outset
.shadowButton7 {
box-shadow: 0 0 1px $light-gray;
transition: box-shadow 0.3s ease;
&:hover, &:focus, &:active {
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
cursor: pointer;
}
}
//shadow inset
.shadowButton8 {
box-shadow: 0 0 1px $light-gray;
box-shadow: inset 0 0 0 rgba(0, 0, 0, 0.5), 0 0 1px rgba(0, 0, 0, 0);
transition: box-shadow 0.3s ease;
&:hover, &:focus, &:active {
box-shadow: inset 2px 2px 2px rgba(0, 0, 0, 0.5), 0 0 1px rgba(0, 0, 0, 0);
cursor: pointer;
}
}