I have a class that I linked to my component to change when the use scrolls down a certain amount, and when it does I add a border. Is there anyway to transition the border? I tried to put the transition on both the navbar--items class and the fixed class.
<nav class='navbar'>
<ul class='navbar__items' [class.fixed]="fixed">
<li class='navbar__item'>About</li>
<li class='navbar__item'>Portfolio</li>
</ul>
</nav>
and for the SCSS
.navbar {
position: fixed;
top: 0;
left: 50%;
transform: translateX(-50%);
padding: 1rem 2rem;
&__items {
width: 95vw;
padding: 1rem 2rem;
padding-left: 4rem;
list-style: none;
display: flex;
align-items: center;
}
}
.fixed {
border: 1px solid rgba($color-black, .2);
box-shadow: 0 .2rem .5rem rgba($color-black, .2);
}