One of the new hidden gems in the new CSS modules, which is supposed to drop in new browser versions in the future, is CSS containment. In this short post, I’ll explain what is the new contain property and why you will want to use it.
CSS Containment Module
The CSS containment module defines a new indication, using the contain property, that an element’s subtree is independent of the rest of the page. This will enable browsers to optimize the performance of rendering/painting.