Files
xrpl-dev-portal/styles/_external-links.scss

71 lines
1.7 KiB
SCSS

.external-link {
&::after {
content: "\00a0";
background-image: url(../img/icons/arrow-up-right.svg);
background-repeat: no-repeat;
display: inline-block;
background-size: 10px;
padding: 0 4px 0 8px;
width: 14px;
background-position: left 0 bottom 4px;
transition: background-position 100ms ease-in-out;
// 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 {
background-position: left 4px bottom 8px;
}
.fa-external-link {
display: none;
}
}
.top-nav .dropdown .external-link,
.xrpl-footer .external-link {
&::after {
background-position: left 8px bottom 3px;
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 12px bottom 6px;
}
}
.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;
}
}
}