Why does changing 'width' cause the whole page to re-layout but 'transform' does not?
Changing 'width' affects the element's size, so the browser recalculates layout for all affected elements (reflow). 'transform' only changes how the element is painted on screen (composite), so it avoids costly layout recalculation.
💡 Size changes trigger layout; transform changes only trigger repaint/composite.
Why can 'box-shadow' slow down my page even if it looks simple?
'box-shadow' can be expensive because the browser must paint blurred shadows, which can be costly especially on many elements or during animations.
💡 Use shadows sparingly and avoid animating them.
Why doesn't 'transition' on 'width' perform as smoothly as on 'transform'?
Transitioning 'width' triggers layout recalculation on every frame, which is slower. Transitioning 'transform' uses GPU compositing and is much faster and smoother.
💡 Animate transform properties for better performance.