-
Notifications
You must be signed in to change notification settings - Fork 0
/
button.css
84 lines (68 loc) · 2.42 KB
/
button.css
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
@media all and (min-width: 100em) and (hover: hover) {
/* Change fab (round) buttons icon color when hovering */
.emby-button.fab:hover {
color: #a7c4bc;
background-color: #404040;
}
/* Add some margin to block buttons so they don't overlap with the animation */
.emby-button.block {
margin: .75em 0;
}
/**********************************************************/
/* emby-button 3D effect hovering using ::before */
/* — used for every square buttons */
/**********************************************************/
.emby-button.raised {
transform-style: preserve-3d;
transition: transform 0.05s ease;
}
.emby-button.raised::before {
content: "";
position: absolute;
top: 0;
left: 0;
display: block;
border-radius: inherit;
width: 100%;
height: 100%;
transition: transform 0.05s ease;
transform: translate3d(0, 0, -1px);
/* z-index doesn't work with transform (it creates a separate context) so
we have to use translate3D to put it behind or in front using Z axis */
}
/* Move button up when it is hovered to simulate a real 3D tangible button */
.emby-button.raised:hover {
transform: translate3d(0, -6px, 1px);
}
.emby-button.raised:hover::before {
transform: translate3d(0, 6px, -1px);
}
/* Move button down when it is clicked to simulate a physical push */
.emby-button.raised:active {
transform: translate3d(0, -2px, 1px);
}
.emby-button.raised:active::before {
transform: translate3d(0, 2px, -1px);
}
/* Color set for gray buttons like refresh */
.emby-button.raised:not(.button-submit):not(.button-delete)::before {
background: #262626;
}
.emby-button.raised:not(.button-submit):not(.button-delete) {
background: #303030;
}
/* Color set for blue buttons like save */
.emby-button.raised.button-submit::before {
background: #0080ff;
}
.emby-button.raised.button-submit {
background: #3399ff;
}
/* Color set for red buttons like delete */
.emby-button.raised.button-delete {
background: #f70000;
}
.emby-button.raised.button-delete::before {
background: #b30000;
}
}