← Back to release summary

CSS Overflow for replaced elements

Category
CSS
Type
New or changed feature
Status
Enabled by default (Chrome 108)
Intent stage
Shipped

Summary

This change allows developers to use the existing `overflow` property with replaced elements that paint outside the content-box. Paired with `object-view-box` this can be used to create an image with a custom glow or shadow applied, with proper ink-overflow behavior like a CSS shadow would have.

Motivation

This change allows developers to use the existing `overflow` property with replaced elements that paint outside the content-box. Paired with `object-view-box` this can be used to create an image with a custom glow or shadow applied, with proper ink-overflow behavior like a CSS shadow would have. Note that the svg spec already respects this property and shared element transitions introduces a replaced element which also needs this functionality. One of the motivations of this feature is to apply this property and related properties (like `overflow-clip-margin`) consistently to all replaced elements.

Standards & signals

Explainers: https://github.com/WICG/shared-element-transitions/blob/main/overflow-on-replaced-elements.md https://github.com/w3c/csswg-drafts/issues/7058

View on chromestatus.com