forked from XRPLF/xrpl-dev-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_external-links.scss
79 lines (72 loc) · 2.03 KB
/
_external-links.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
.external-link {
&::after {
content: "\00a0";
background-image: url(../img/icons/arrow-up-right.svg);
background-repeat: no-repeat;
display: inline-block;
background-size: 16px; // changed from 15px
padding: 0 4px 0 8px;
width: 16px; // changed from 14px
height: 16px; // added this line
background-position: center; // changed this line
transition: transform 100ms ease-in-out; // changed from background-position
// Note: the background position is based on the padding, so it might
// need adjustments for elements with more padding to make it line up
// with the text. I thought background-origin: content-box might fix this
// but it doesn't seem to.
}
&:hover::after {
transform: translate(3px, -3px); // Translate the arrow up and to the right
}
.fa-external-link {
display: none;
}
}
.top-nav .dropdown .external-link,
.xrpl-footer .external-link {
&::after {
background-position: left 6px bottom 1px;
width: 2rem;
@-moz-document url-prefix() {
@supports (animation: calc(0s)) {
// Firefox's alignment of the SVG is 1 pixel lower than Chrome's,
// so this rule fixes that.
background-position: left 8px bottom 2px;
}
}
}
&:hover::after {
background-position: left 8px bottom 3px;
}
}
.q-wrapper .external-link {
&::after {
background-position: left 0 bottom 7px;
}
&:hover::after {
background-position: left 4px bottom 11px;
}
}
.li-links {
position: relative;
border-bottom: 2px solid $gray-600;
a {
width: 100%;
padding: 16px 0;
&::after {
position: absolute;
right: 4px;
content: "\00a0";
background-image: url(../img/icons/arrow-up-right.svg);
background-repeat: no-repeat;
display: inline-block;
background-size: 1.5rem;
padding: 0 .5rem;
background-position: left 0 bottom -.1rem;
transition: background-position 100ms ease-in-out;
}
&:hover::after {
background-position: left .2rem bottom .1rem;
}
}
}