CSS aspect-ratio works in Chrome 88+, Edge 88+, Firefox 89+, Safari 15+, Opera 74+, and Samsung Internet 15+. Learn aspect-ratio support and quirks.

Prince Dewani
May 1, 2026
CSS aspect-ratio is a CSS Box Sizing Module Level 4 property from the W3C that sets the width-to-height ratio of an element's box. It works in Chrome 88+, Edge 88+, Firefox 89+, Safari 15+ on macOS and iOS, Opera 74+, Samsung Internet 15+, and Android Browser 147+, while Internet Explorer never added support.
This guide covers what aspect-ratio is, the browsers that support it, the key features, use cases, how to check support, and the known issues.
CSS aspect-ratio is a CSS property from the CSS Box Sizing Module Level 4 specification of the W3C. It sets the preferred width-to-height ratio of an element's box so the browser keeps that ratio as the layout reflows. At least one of width or height must resolve to auto for the property to take effect.
CSS aspect-ratio is Baseline Widely Available and ships in every modern desktop and mobile browser. Chrome 88, Edge 88, Firefox 89, Safari 15 on macOS and iOS, Opera 74, and Samsung Internet 15 all enable it by default, while Internet Explorer never received support.
Chrome supports CSS aspect-ratio by default from Chrome 88 on Windows, macOS, Linux, ChromeOS, and Android. Chrome 4 to 87 did not support the property at all. Chrome on Android picks up support from Chrome 88 onward across phone and tablet builds, and Chromium-based WebView inherits the property once the system WebView updates past 88.
Microsoft Edge supports CSS aspect-ratio by default from Edge 88 on Windows, macOS, and Linux. Edge 12 to 87 did not support the property. Legacy EdgeHTML versions never received aspect-ratio, so users on stale Edge builds should switch to a current Chromium-based Edge release.
Firefox supports CSS aspect-ratio by default from Firefox 89 on Windows, macOS, Linux, and Android. Firefox 2 to 88 did not support it. Firefox for Android shares the same Gecko engine, so mobile picks up aspect-ratio from Firefox 89 onward without a separate flag.
Safari supports CSS aspect-ratio by default from Safari 15 on macOS Big Sur 11.4 and later, and from iOS 15 on iPhone and iPad. Safari 3.1 to 14.1 on macOS and Safari on iOS 3.2 to 14.8 do not support it. The WebKit team enabled the property after several Technology Preview iterations cleaned up flexbox and box-sizing edge cases.
Opera supports CSS aspect-ratio by default from Opera 74 on desktop and from Opera Mobile 80 on Android. Opera 10 to 73 did not support the property. Opera follows the Chromium release cadence, so it inherits the same Blink aspect-ratio implementation that Chrome uses.
Samsung Internet supports CSS aspect-ratio by default from Samsung Internet 15 on Galaxy phones and tablets. Samsung Internet 4 to 14 did not support the property. The browser shares the underlying Chromium engine with Chrome on Android, so the property arrived on the same Blink milestone that Chrome 88 shipped.
Chrome for Android supports CSS aspect-ratio from Chrome 88, and the modern Android Browser ships aspect-ratio from version 147 onward. Android Browser 2.1 to 4.4.4 on the legacy Android stack does not support it. WebView on Android 5.0 and later inherits the Chromium engine, so apps that embed WebView pick up aspect-ratio once the system WebView updates past Chromium 88.
Internet Explorer 5.5 through 11 do not support CSS aspect-ratio in any version. The Trident engine never received the property. Users on Windows who need aspect-ratio should switch to Microsoft Edge 88 or later or to Chrome 88 or later.
Note: CSS aspect-ratio breaks across older browsers and edge cases like flexbox stretching and min-height overrides. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!
CSS aspect-ratio replaces a stack of layout hacks with a single declarative property. The surface is small, but each feature solves a problem that used to need padding tricks or JavaScript.
CSS aspect-ratio shows up in production stacks any time a box needs to keep its shape across viewports. The property is now the default tool for several layout patterns that older sites still ship as JavaScript or padding hacks.
The cleanest check is the @supports at-rule with a property and value pair. Wrap aspect-ratio rules so the browser only applies them when the engine parses the property, and pair the rule with @supports not to ship a padding-top fallback for older browsers.
/* Feature-detect aspect-ratio before applying it. The block runs only when
the browser parses the property; older engines skip it and fall through
to the @supports not block below. */
@supports (aspect-ratio: 1 / 1) {
.video-embed {
width: 100%;
aspect-ratio: 16 / 9;
height: auto;
}
}
/* Padding-top fallback for browsers without aspect-ratio support. */
@supports not (aspect-ratio: 1 / 1) {
.video-embed {
position: relative;
padding-top: 56.25%;
height: 0;
}
.video-embed > iframe {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}
}For runtime checks, the CSS.supports JavaScript API parses the same property and value pair. Paste this snippet into the DevTools console of any browser to see whether the engine recognizes aspect-ratio.
// Paste into any browser DevTools console to check aspect-ratio support
// at runtime. CSS.supports parses the property and value pair and returns
// a boolean.
const supportsAspectRatio = CSS.supports('aspect-ratio', '1 / 1');
console.log(`aspect-ratio supported in this browser: ${supportsAspectRatio}`);
// Logs true on Chrome 88+, Edge 88+, Firefox 89+, Safari 15+, Opera 74+,
// and Samsung Internet 15+. Logs false on Internet Explorer and any
// browser older than the versions above.If CSS.supports returns false, the browser silently ignores any rule that contains aspect-ratio. Use the @supports not block above to set padding-top space for those users instead of leaving the layout collapsed.
CSS aspect-ratio is Baseline Widely Available, but the way browsers resolve the property next to other constraints still has rough edges that hit production sites. Plan around these before you replace padding-top hacks with aspect-ratio.
In my experience, the silent failure mode that bites teams the most is leaving width and height set on lazy-loaded img tags: the framework ships both attributes for layout-shift reasons, then aspect-ratio: 3 / 2 auto on the same image is ignored. Drop the height attribute on the markup and let aspect-ratio drive height for the auto behavior to actually fire.
All CSS aspect-ratio version numbers and platform notes in this guide come from these primary sources:
Did you find this page helpful?
More Related Hubs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance