Yeah indeed, things can get messy in this case.
I was a box-sizing: inherit; person, then I realised this is super useful:
margin: 0 auto;
padding: 0 20px;
It means that when the screen is less than 1240px wide, it will have a 20px gap down either side of the screen with no need for media queries.
This technique doesn't work with box-sizing: inherit; though.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.