Web Developer — Setup before writing code, do you need it? #Day9

If you start a new project it might be ok and clean to add * { box sizing: border-box; } at the beginning so you can use it on the entire project and everyone else developing on the project will see it.

BUT if you work on an existing project and then just add * { box sizing: border-box; } somewhere could mess up the entire layout! So there it might be “safer” to only add it to the containers you are working on with something like .border-boxed-container * { box sizing: border-box; }. Or have an extra class like “border-boxed” which you can add to every element accordingly the CSS .border-boxed { box sizing: border-box; }

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store