Black Lives Matter! ✊🏾


The contain property allows an author to indicate that an element and its contents are, as much as possible, independent of the rest of the document tree. 2. Strong Containment: the contain property

Links about contain

  1. Let’s Take a Deep Dive Into the CSS Contain Property | CSS-Tricks

    posted on by Travis Almand

    Compared to the past, modern browsers have become really efficient at rendering the tangled web of HTML, CSS, and JavaScript code a typical webpage

  2. Helping Browsers Optimize With The CSS Contain Property — Smashing Magazine

    posted on by Rachel Andrew

    The CSS contain property gives you a way to explain your layout to the browser, so performance optimizations can be made. However, it does come with some side effects in terms of your layout.

Code sample

.item {
contain: layout;