Can I use in my all murkup (all project ) box-sizing: border-box;
?
for example:
html {
box-sizing: border-box;
},
:before, *:after {
box-sizing: inherit;
}
Because it is easier to count the real width, but are there any downsides to this approach?
I generally apply it to everything. Use:
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
It makes everything a lot easier and is widely supported.
https://css-tricks.com/international-box-sizing-awareness-day/
http://www.paulirish.com/2012/box-sizing-border-box-ftw/
It's also worth noting that the CSS working group consider this a mistake in the design of CSS:
Box-sizing should be border-box by default.
https://wiki.csswg.org/ideas/mistakes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With