File: D:/HostingSpaces/SBogers10/reiskick.komma.nl/resources/sass/5-Components/_components.nav.scss
$c-nav-link-padding: 16px;
.c-nav {
height: 100%;
padding: 0;
}
.c-nav__list {
display: flex;
justify-content: flex-end;
align-items: center;
margin-left: 0;
padding: 0;
list-style: none;
}
.c-nav__item {
position: relative;
font-size: 0.8rem;
font-weight: bold;
white-space: nowrap;
&:last-child {
margin-right: 0;
}
}
.c-nav__link {
position: relative;
padding: #{ $c-nav-link-padding / 2 } $c-nav-link-padding;
color: rgba(palette(neutral, 900), 0.75);
text-decoration: none;
transition: color 150ms linear, opacity 150ms;
&::before {
content: '';
display: block;
position: absolute;
z-index: -1;
left: $c-nav-link-padding;
bottom: 1px;
width: calc(100% - #{double($c-nav-link-padding)});
height: 2px;
border-radius: 1px;
background-color: palette(secondary, 200);
transform: scaleX(0);
transform-origin: bottom right;
transition: transform 550ms cubic-bezier(0.86, 0, 0.07, 1);
}
&:after {
content: '';
position: absolute;
right: -2px;
bottom: -4px;
display: inline-block;
width: 13px;
height: 12px;
background-image: url("/img/airplane.svg");
background-size: contain;
background-repeat: no-repeat;
transform: translateX(-80px);
opacity: 0;
transition: opacity 550ms cubic-bezier(0.86, 0, 0.07, 1) 0s, transform 0s linear 550ms;
}
&:hover {
color: rgba(palette(neutral, 900), 0.9);
&:after {
transition: opacity 550ms cubic-bezier(0.86, 0, 0.07, 1) 0s, transform 550ms cubic-bezier(0.86, 0, 0.07, 1) 0s;
opacity: 1;
transform: translateX(0);
}
&::before {
transform: scaleX(1);
transform-origin: bottom left;
}
}
// When item is active
.is-active.c-nav__item & {
color: rgba(palette(neutral, 900), 1);
&::before {
transform: scaleX(1);
transform-origin: bottom left;
}
&:after {
display: none;
}
.o-header--on-dark & {
color: rgba(palette(neutral, 0), 1);
}
}
&:focus {
outline-color: palette(feedback, focus);
}
.o-header--on-dark & {
color: rgba(palette(neutral, 0), 0.75);
&:hover {
color: rgba(palette(neutral, 0), 0.9);
}
}
}