I am reading a CSS book and come cross the following snippet,
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
My understanding of * is that it selects all the elements. So I do not get what is *:before and *:after.
Also the book says, the snippet above applies border-box sizing to every element by default, without affecting the box-sizing behavior of existing parts of your project. I also do not quite understand this. Hope someone can help me explain.
Thanks!