Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

scale — independent element scaling

The scale property changes an element’s visual scale independently of transform. It accepts one to three factors for the X, Y, and Z axes without changing the space reserved in layout.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

scale: none | [ <number> | <percentage> ]{1,3};

scale scales an element around transform-origin. It accepts 1–3 space-separated values: X, Y, Z. Omitted Y defaults to X; Z defaults to 1. The initial value is none; the property is not inherited.

1 and 100% mean unchanged scale; percentages are factors, not parent dimensions. A negative factor reverses an axis. Z other than 1 specifies 3D scaling. scale is a separate property, not the scale() function in transform; both transformations can compose.

Scaling does not change the element’s space in normal layout, so overlap is possible. In the example, the rectangle still occupies 100 × 40 CSS pixels in layout but measures 200 × 60 after transformation. transform-origin: top left keeps its top-left corner fixed.

Examples

<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>scale</title>
<style>
  .box {
    width: 100px;
    height: 40px;
    background: teal;
    transform-origin: top left;
    scale: 2 1.5;
  }
</style>
<div class="box"></div>
</html>

Result

Layout box: 100 × 40 CSS px. Transformed rectangle: 200 × 60 CSS px.

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources