Isolate #wrap's layout from the rest of the page.
Acceptance criteria
- 1.Isolate #wrap's layout from the rest of the page.
CSS Tutorial · CSS Output & Performance
These 10 tasks go with the CSS Performance chapter. 5 of them ask you to build something small from scratch; 5 give you code that is already broken and ask you to work out why. Set aside about 90 minutes for the whole set, though you can do them in any order.
Nothing here is marked by a person. When you press Submit, the editor checks your code against the points listed under each task and tells you straight away what passed and what didn't (you need a free account to submit). If you get stuck, there are hints, and a worked solution once you've had a go. The first 2 tasks are free; the rest are part of the practice plan.
If it's been a while since you read the chapter, here is how it starts: “Use containment and deferred rendering where measurement shows a real rendering cost. You will use layout and paint containment, content-visibility, intrinsic placeholder sizes, and measurement-driven performance checks.” .
1.Contain the layoutexercise · easy · 10 min
Isolate #wrap's layout from the rest of the page.
Passes when: Isolate #wrap's layout from the rest of the page.
2.Contain two thingsexercise · easy · 10 min · practice plan
Contain both layout and paint on #wrap.
Passes when: Contain both layout and paint on #wrap.
3.Skip offscreen renderingexercise · easy · 10 min · practice plan
Let the browser skip #wrap until it is needed.
Passes when: Let the browser skip #wrap until it is needed.
4.Reserve the spaceexercise · easy · 10 min · practice plan
Give skipped content a 200px placeholder size.
Passes when: Give skipped content a 200px placeholder size.
5.Hint an upcoming changeexercise · medium · 10 min · practice plan
Warn the browser that #text's transform will animate.
Passes when: Warn the browser that #text's transform will animate.
6.Fix the invalid valuebug fix · easy · 8 min
The containment type is layout.
Passes when: The containment type is layout.
7.Fix the commabug fix · easy · 8 min · practice plan
Containment types are separated by spaces.
Passes when: Containment types are separated by spaces.
8.Fix the misspelled propertybug fix · easy · 8 min · practice plan
The property is content-visibility.
Passes when: The property is content-visibility.
9.Fix the missing placeholder sizebug fix · easy · 8 min · practice plan
Skipped content needs a reserved size.
Passes when: Skipped content needs a reserved size.
10.Fix the hint on the wrong propertybug fix · easy · 8 min · practice plan
The transform is what will change, not the colour.
Passes when: The transform is what will change, not the colour.
Between them these tasks cover contain, content-visibility and will-change.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.