-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathanimations.scss
52 lines (44 loc) · 1.08 KB
/
animations.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
// Animation utilities for marketing
.hover-grow-mktg {
// stylelint-disable-next-line declaration-property-value-no-unknown
transition: transform 0.4s $ease-mktg;
&:hover {
transform: scale3d(1.025, 1.025, 1.025);
}
}
// Animated arrow symbol, used in marketing links, buttons, etc.
.btn-mktg,
.link-mktg,
.arrow-target-mktg {
.octicon {
width: 1em;
height: 1em;
}
.arrow-symbol-mktg {
transition: transform 0.2s;
transform: translateX(0);
// stylelint-disable-next-line selector-max-type
path:last-child {
stroke-dasharray: 10;
stroke-dashoffset: 10;
transition: stroke-dashoffset 0.2s;
}
}
@media screen and (prefers-reduced-motion: no-preference) {
&:hover,
&:focus {
.arrow-symbol-mktg {
transform: translateX(4px);
// stylelint-disable-next-line selector-max-type, selector-max-specificity, max-nesting-depth
path:last-child {
stroke-dashoffset: 20;
}
}
}
&:active {
.arrow-symbol-mktg {
transform: translateX(6px);
}
}
}
}