We can make variables in CSS pretty easily: :root { --scale: 1; } And we can declare them on any element: .thing { transform: scale(var(--scale)); } Even better for an example like this is applying the variable on a user interaction, say :hover: :root { --scale: 1; } .thing { height: 100px; transform: scale(var(--scale)); width: 100px; } .thing:hover { --scale: 3; } But if we wanted to use that va