CKTIS / CSS
scaleY(): vertical scaling without reflow
Stretch, compress or reflect the rendered Y axis while preserving the original layout box.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
transform: scaleY(0.5);scaleY(s) uses scale factors (1,s), so the horizontal size is unchanged by this function alone. A positive fraction reduces the visible height, a factor above 1 increases it, and a negative factor reflects vertically as well. The argument is a number or supported percentage: 50% represents 0.5, whereas 2px is invalid.
The reference point comes from transform-origin. At 0 0, scaling extends from the top; at the default center it extends around the middle. The transformed box can overlap nearby content because scaling does not make surrounding layout reserve its new visual height. A zero factor makes the transform singular and suppresses rendering, while the layout box still exists.
The example starts with a 40×30px box at y=60. scaleY(0.5) produces edges 60 and 75. scaleY(-2) with the top origin gives edges 0 and 60; with the center origin it gives 45 and 105. The width stays 40, and the layout height stays 30. A zero factor collapses the measured height at y=75.
Examples
const box=document.createElement('div');
box.style.cssText='position:fixed;left:60px;top:60px;width:40px;height:30px;transform-origin:0 0';
document.body.append(box);
const measure=value=>{box.style.transform=value;const r=box.getBoundingClientRect();return [r.top,r.bottom,r.width,r.height].join(',')};
const half=measure('scaleY(0.5)');
const mirrored=measure('scaleY(-2)');
box.style.transformOrigin='50% 50%';
const centered=measure('scaleY(-2)');
const zero=measure('scaleY(0)');
console.log('half='+half+'; mirror='+mirrored+'; center-mirror='+centered+'; zero='+zero+'; layout='+box.offsetWidth+'x'+box.offsetHeight+'; percent='+CSS.supports('transform','scaleY(50%)')+'; length='+CSS.supports('transform','scaleY(2px)'));Result
half=60,75,40,15; mirror=0,60,40,60; center-mirror=45,105,40,60; zero=75,75,40,0; layout=40x30; percent=true; length=false
Use the transformed rectangle for visible geometry and the layout dimensions for flow. The example isolates this single transform so parent transforms cannot change the interpretation.