I don’t have a problem with code but still don’t understand one thing. Here’s the code, I’ll explain:
#years {
display: flex;
justify-content: flex-end;
position: sticky;
top: 0;
background: #0a0a23;
color: #fff;
z-index: 999;
margin: 0 -2px; /* Why are we setting left and right margins to -2px? */
padding: 0.5rem calc(1.25rem + 2px) 0.5rem 0;
So, why are we setting this margin here? Is it only so we can learn how to use “calc” or is it due to something I don’t see?
Thanks!