Previews

No matching results.

x
1
<a href="#" data-view-component="true" class="Link Link--underline">This is a link!</a>
1
render(Primer::Beta::Link.new(href: "#", scheme: scheme, muted: muted, underline: underline)) { "This is a link!" }

app/components/primer/beta/link.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
/* Links */
.Link {
color: var(--fgColor-accent);
-webkit-text-decoration: none;
text-decoration: none;
}
.Link:hover {
-webkit-text-decoration: underline;
text-decoration: underline;
cursor: pointer;
}
.Link:focus {
-webkit-text-decoration: underline;
text-decoration: underline;
}
.Link:focus,.Link:focus-visible {
outline-offset: 0;
}
.Link--underline {
-webkit-text-decoration: underline;
text-decoration: underline;
}
.Link--primary {
color: var(--fgColor-default) !important;
}
.Link--primary:hover {
color: var(--fgColor-accent) !important;
}
.Link--secondary {
color: var(--fgColor-muted) !important;
}
.Link--secondary:hover {
color: var(--fgColor-accent) !important;
}
.Link--muted {
color: var(--fgColor-muted) !important;
}
.Link--muted:hover {
color: var(--fgColor-accent) !important;
-webkit-text-decoration: none;
text-decoration: none;
}
/* Set the link color only on hover
Useful when you want only part of a link to turn blue on hover */
.Link--onHover:hover {
color: var(--fgColor-accent) !important;
-webkit-text-decoration: underline;
text-decoration: underline;
cursor: pointer;
}
/* When using a color utility class inside of a link class
color should change with link on hover. */
:is(.Link--secondary,.Link--primary,.Link--muted):hover [class*='color-fg'] {
color: inherit !important;
}
.Link-content {
display: inline-flex;
align-items: center;
/* stylelint-disable-next-line primer/typography */
line-height: normal;
gap: var(--base-size-4);
text-decoration: inherit;
}