Q19: How do transform functions alter element visual layout without triggering reflows?

transform functions (translate, scale, rotate, skew) alter visual geometric rendering without modifying element box model dimensions or affecting surrounding layout flow, avoiding expensive CPU reflow calculations.

Combining GPU Transform Functions
.card-hover {
  transition: transform 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-8px) scale(1.05);
}

translateY and scale provide GPU-accelerated hover effects without disturbing adjacent cards.

Key Takeaways
  • Transforms modify visual rendering without triggering document layout reflows.

  • translate() positioning is GPU-accelerated.

Knowledge Check

Does applying transform: translateY(-20px) shift the layout position of adjacent sibling elements?