-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathLink.module.css
82 lines (69 loc) · 1.44 KB
/
Link.module.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
.Link {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
transition: box-shadow var(--brand-animation-duration-faster);
text-decoration: none;
cursor: pointer;
}
.Link:hover {
text-decoration: none;
}
.Link::after {
position: absolute;
bottom: -0.15em;
left: 0;
width: calc(100% - 1.5em);
height: 2px;
pointer-events: none;
content: '';
background-color: currentColor;
transform: scaleX(0);
transform-origin: 0 0;
}
@media screen and (prefers-reduced-motion: no-preference) {
.Link::after {
transition: transform var(--brand-animation-duration-fast) ease;
}
}
.Link:active:after,
.Link:hover:after {
transform: scaleX(1);
}
.Link:focus:focus-visible {
outline: none;
box-shadow: 0 0 0 2px var(--brand-color-canvas-default), 0 0 2px 5px var(--brand-color-focus);
transition: none;
}
.Link--default,
.Link--default span {
color: var(--brand-Link-color-default);
}
.Link--accent,
.Link--accent span {
color: var(--brand-Link-color-accent);
}
.Link--label {
font-weight: var(--base-text-weight-semibold);
}
.Link-arrow {
margin-left: 4px;
}
.Link--large .Link--label {
font-size: var(--base-size-20);
}
.Link--large .Link-arrow {
width: 20px;
height: 20px;
}
.Link--arrow-start::after {
left: auto;
right: 0;
transform-origin: right 0;
width: calc(100% - var(--base-size-20));
}
.Link--arrow-start .Link-arrow {
margin-left: auto;
margin-right: 4px;
}