.sidebar { align-self: flex-start; display: none; position: sticky; top: 13.2rem; } .nav { align-items: flex-start; display: flex; flex-direction: column; gap: 2rem; padding-left: 4rem; } .link { align-items: center; color: var(--some-text-color, #111); display: flex; font-size: 1.6rem; font-weight: 400; gap: 0.6rem; line-height: 1.9rem; position: relative; text-decoration: none; } .active { font-weight: 600; } .active::before { bottom: -0.4rem; background-color: var(--some-text-color, #000); content: ""; height: 0.2rem; position: absolute; width: 100%; } @media screen and (min-width: 950px) { .sidebar { display: block; } }