Another way you can do this with a little less CSS, is on the .main__content. Remove the width property and just have flex: 1. Now if the sidebar is hidden, it will just take up the room you wanted.
I am a self taught developer that works best when floating in between design and engineering teams. I enjoy sharing what I know via short instructional screencasts and the occasional written post.
Another way you can do this with a little less CSS, is on the
.main__content
. Remove the width property and just haveflex: 1
. Now if the sidebar is hidden, it will just take up the room you wanted.Definitely, you can see here that I make that recommendation youtu.be/OkcUU_G-wVU?t=396