# scale

> The `scale` CSS property allows resizing an element along the X and Y axes.

## What is the difference between the scale property and transform: scale()?

The property that scales an element in 2D or 3D space by adjusting its size. It doesn't overwrite the `transform` property, as it modifies the element's size without affecting other transform functions. This property is useful for enlarging or shrinking elements to create various visual effects.

- Topic: Transformations
- Type: property
- Browser support: Chrome 104+, Chrome Android 104+, Edge 104+, Firefox 72+, Firefox Android 79+, Safari 14.1+, Safari iOS 14.5+

## Example

Wrong:

```css
.modal {
  transform: translate(-50%, -50%);
}
.modal:hover {
  transform: scale(1.05);
}
```

Right:

```css
.modal {
  transform: translate(-50%, -50%);
}
.modal:hover {
  scale: 1.05;
}
```

The `scale` property stacks with `transform`, so the modal stays centered while it grows.

## Common mistakes

- Writing `scale: 2, 2` with a comma, so it is ignored.
- A hover `transform: scale()` wipes out a centering `translate(-50%, -50%)`.

## Key points

- Hover zoom on elements that already have a `transform` uses the `scale` property so the existing transform stays.
- Values in the `scale` property are space-separated, without commas.

## Interview questions

### In what order are scale and transform applied?

The browser applies `translate`, then `rotate`, then `scale`, and then the `transform` property.

### Does the scale property use transform-origin?

Yes. Individual transform properties scale around `transform-origin`, which is the center by default.

## Related cards

- [scale()](https://wonderium.dev/css/scale.md)
- [translate](https://wonderium.dev/css/translate-property.md)
- [rotate](https://wonderium.dev/css/rotate-property.md)
- [transform-origin](https://wonderium.dev/css/transform-origin.md)
- [transform](https://wonderium.dev/css/transform.md)

---

- Level: [CSS](https://wonderium.dev/css.md)
- HTML version: https://wonderium.dev/css/scale-property
- Last updated: 2026-11-25
