In terms of CSS, for example, two rectangular boxes, the width and height are the same, except for the background color. I merge the width and height codes of the two boxes into a common part of the CSS code, and handle the remaining background color separately. ,
In addition to reducing the amount of code, what other benefits does this have!
Easy to maintain. If you want to change the width and height in the future, you only need to change one place. If you haven't separated, then you have to change a lot of things.
By the way, this is related to the optimization of css code. Correct answer upstairs.
Improve the readability of CSS files and reduce the size of CSS files, which can relatively speed up the browser loading speed.
These are all about CSS optimization.