A structured lesson workspace with readable content, hands-on examples, and a clean path to completion.
| Concern | What to inspect | Typical failure |
|---|---|---|
| Core behavior | Avoiding Expensive Layout and Paint Operations | A property being “GPU accelerated” is not a performance contract. |
| Production test | Real content and constraints | The rule works only for the demo values |
| Maintenance | Scope and override path | A later fix creates another exception |
A good CSS change narrows the problem. Profile real interaction paths and contain work where the layout boundary is meaningful. This keeps the rule understandable when content, theme, or viewport conditions change later.
<style>.panel{transform:translateX(1rem);}</style><main class="panel">Example content</main>
In production, A property being “GPU accelerated” is not a performance contract. That is the kind of bug that survives visual spot checks because the stylesheet is syntactically valid while the layout contract is wrong.
<style>.panel{opacity:.99;}</style><main class="panel">Example content</main>
Engineering judgment: Profile real interaction paths and contain work where the layout boundary is meaningful.
A good CSS change narrows the problem. Profile real interaction paths and contain work where the layout boundary is meaningful. This keeps the rule understandable when content, theme, or viewport conditions change later.
<style>.list{contain:layout paint;}</style><main class="list">Example content</main>
Example 3 is useful here because it demonstrates avoiding expensive layout and paint operations under a concrete input rather than as an abstract property list.
<style>.content{content-visibility:auto;}</style><main class="content">Example content</main>
Example 4 is useful here because it demonstrates avoiding expensive layout and paint operations under a concrete input rather than as an abstract property list.
Finish the lesson once you have worked through the material. This awards ★ 40 XP.