Engrain by ByteRush

QLT.01.04 JuniorCore — asked often

Optimising CLS

Comes up in: Web fundamentals, Frontend system design

This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.

What it covers

  • reserve space (width/height, aspect-ratio)
  • fonts (size-adjust, font-display)
  • late-injected banners/ads
  • animations with transform
  • bfcache restores

Words you will know

layout shiftaspect-ratio

What you will practise

  • remove all shifts from a news page

Interview questions this answers

  • What causes layout shifts and how do you prevent them?