HTML & CSS · Senior · Question 7 of 75

What does contain: layout paint (or contain: content) give you?

Explanation

CSS Containment isolates a subtree: changes inside don't force layout and paint of the rest of the page. Useful for widgets, feeds and complex components. Side effect: paint clips content to the bounds and creates a containing block and a stacking context, so don't apply it thoughtlessly.

Further reading

Problem with a question

HTML & CSS · Senior · question 7

Test yourself

Take the HTML & CSS · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz