-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_hovers-mixin.scss
110 lines (92 loc) · 1.77 KB
/
_hovers-mixin.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
@mixin dim {
opacity: 1;
transition: opacity 0.15s ease-in;
&:hover,
&:focus {
opacity: 0.5;
transition: opacity 0.15s ease-in;
}
&:active {
opacity: 0.8;
transition: opacity 0.15s ease-out;
}
}
@mixin glow {
transition: opacity 0.15s ease-in;
&:hover,
&:focus {
opacity: 1;
transition: opacity 0.15s ease-in;
}
}
@mixin hide-child($child: child) {
opacity: 0;
transition: opacity 0.15s ease-in;
&:hover #{$child},
&:focus #{$child},
&:active #{$child} {
opacity: 1;
transition: opacity 0.15s ease-in;
}
}
@mixin underline-hover {
&:hover,
&:focus {
text-decoration: underline;
}
}
@mixin grow {
-moz-osx-font-smoothing: grayscale;
backface-visibility: hidden;
transform: translateZ(0);
transition: transform 0.25s ease-out;
&:hover,
&:focus {
transform: scale(1.05);
}
&:active {
transform: scale(0.9);
}
}
@mixin grow-large {
-moz-osx-font-smoothing: grayscale;
backface-visibility: hidden;
transform: translateZ(0);
transition: transform 0.25s ease-in-out;
&:hover,
&:focus {
transform: scale(1.2);
}
&:active {
transform: scale(0.95);
}
}
@mixin shadow-hover {
cursor: pointer;
position: relative;
transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
&::after {
content: "";
box-shadow: 0 0 16px 2px rgb(0 0 0 / 20%);
border-radius: inherit;
opacity: 0;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}
&:hover::after,
&:focus::after {
opacity: 1;
}
}
@mixin bg-animate {
transition: background-color 0.15s ease-in-out;
&:hover,
&:focus {
transition: background-color 0.15s ease-in-out;
}
}