World’s largest virtual agentic engineering & quality conference
CSS media range syntax works in Chrome 104+, Edge 104+, Firefox 63+, Safari 16.4+, Opera 91+, and Samsung Internet 20+. See operators, examples, and limits.

Prince Dewani
Author
Last Updated on: July 17, 2026
CSS media range syntax is a Media Queries Level 4 feature that uses comparison operators like <, <=, >, and >= to test width, height, and other range-type values. It works in Chrome 104+, Edge 104+, Firefox 63+, Safari 16.4+, Opera 91+, and Samsung Internet 20+, while Internet Explorer never added support.
The feature is part of Baseline 2023: it became Newly Available on March 27, 2023, the day Safari 16.4 shipped as the last core browser, and graduated to Baseline Widely Available in September 2025. In practice that means you can write range syntax in production today and reserve fallbacks for legacy long-tail audiences.
This guide covers what the syntax is, the browsers that support it, the comparison operators, how to write a range query, the supported features, and known limitations.
Overview
CSS media range syntax is a Media Queries Level 4 feature that uses the comparison operators <, <=, >, and >= to test width, height, and other range-type values inside a media query, replacing the older min- and max- prefix forms.
Which browsers support CSS media range syntax?
Why use range syntax over min-width and max-width?
It lets you bracket a bounded range in one expression, like (400px <= width <= 1000px), and use true exclusive bounds such as (width < 768px) that remove the 1px breakpoint overlap without a fractional hack.
How do you ship it safely across browsers?
Test your layouts on the real browser and OS versions your users run, since a range rule silently drops on Safari 16.3 and older. TestMu AI's cross browser automation cloud lets you validate media queries across Chromium, Gecko, and WebKit builds before release.
CSS media range syntax is the range context defined in the W3C Media Queries Level 4 specification. It lets a CSS @media rule use the comparison operators <, <=, >, >=, and = on range-type features such as width, height, aspect-ratio, and resolution, replacing the older min- and max- prefix forms.
CSS media range syntax works in every modern Chromium, Gecko, and WebKit release, with Internet Explorer as the only major engine that never shipped it. Global support sits above 93% of tracked browser usage.
Chrome supports CSS media range syntax from Chrome 104 on Windows, macOS, Linux, ChromeOS, and Android. Chrome 1 to 103 did not support the new operators and skip rule blocks that use them.
Edge supports CSS media range syntax from Edge 104 on Windows, macOS, and Linux. Edge picks up the feature from the same Chromium 104 milestone as Chrome, and earlier Edge builds, including the legacy non-Chromium versions, do not support range syntax.
Firefox supports CSS media range syntax from Firefox 63 on Windows, macOS, Linux, and Android. Firefox was the first major browser to ship the syntax, well ahead of Chromium and Safari, and Firefox 1 to 62 do not support it.
Safari supports CSS media range syntax from Safari 16.4 on macOS and from Safari on iOS 16.4 on iPhone and iPad. Safari 1 to 16.3 on macOS, and Safari on iOS 3.2 to 16.3, ignore the new operators and skip the rule block.
Opera supports CSS media range syntax from Opera 91 on Windows, macOS, and Linux, with Opera Mobile picking it up from version 80 on Android. Opera 1 to 90 and Opera Mobile 12.1 and earlier do not support it.
Samsung Internet supports CSS media range syntax from Samsung Internet 20 on Android phones and tablets. Samsung Internet 4 to 19 ship the older min- and max- syntax only.
Android Browser supports CSS media range syntax from Android Browser 147 on. Older Android Browser builds, including the 4.4.4 stock browser, do not parse the new operators and need min-width and max-width fallbacks.
Internet Explorer never supported CSS media range syntax. IE 5.5 through IE 11 only understand the older min- and max- prefix style, and Microsoft has retired Internet Explorer, so move IE-bound work to Chromium-based Edge.
Note: CSS media range syntax breaks across older Safari, IE, and stale Android Browser builds. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!
Range syntax exposes five comparison operators that map to the math symbols a developer already knows. Each operator works on any range-type media feature.
Every legacy min- and max- prefix query has a direct range-syntax equivalent, and the modern form adds exclusive bounds the old syntax never had.
| Legacy prefix syntax | Modern range syntax | Notes |
|---|---|---|
| (min-width: 768px) | (width >= 768px) | Inclusive lower bound, identical behavior |
| (max-width: 768px) | (width <= 768px) | Inclusive upper bound, identical behavior |
| (min-width: 320px) and (max-width: 768px) | (320px <= width <= 768px) | Bounded range in one expression |
| (max-width: 767.98px) workaround | (width < 768px) | True exclusive upper bound, no fractional hack |
| (min-width: 768.02px) workaround | (width > 768px) | True exclusive lower bound, no fractional hack |
Legacy min- and max- prefixes are both inclusive bounds. That creates a classic bug: at a viewport of exactly 768px, both (max-width: 768px) and (min-width: 768px) match, so mobile and desktop rules apply at the same instant and the winner depends on source order. The ecosystem workaround was to subtract a fraction from the upper breakpoint, which is why frameworks like Bootstrap write (max-width: 767.98px), choosing 0.02px over a full 1px so fractional viewport widths between 767px and 768px do not fall through the gap.
Exclusive operators make the hack unnecessary. Writing (width < 768px) and (width >= 768px) partitions the viewport cleanly: every width matches exactly one of the two rules, with no overlap and no fractional magic number.
/* Legacy: both rules match at exactly 768px - overlap bug */
@media (max-width: 768px) { /* mobile styles */ }
@media (min-width: 768px) { /* desktop styles */ }
/* The old workaround: subtract 0.02px from the upper bound */
@media (max-width: 767.98px) { /* mobile styles */ }
@media (min-width: 768px) { /* desktop styles */ }
/* Modern: exclusive < partitions cleanly, no hack needed */
@media (width < 768px) { /* mobile styles */ }
@media (width >= 768px) { /* desktop styles */ }If you are standardizing your breakpoint scale while migrating, our guide to common CSS breakpoints covers the values most production sites use.
Drop the new operators inside the parentheses of an @media rule. The rule body is identical to a classic media query, only the feature expression changes.
A common pattern looks like the snippet below, which combines a single-bound rule and a bounded-range rule on the same selector.
/* Single-bound rule: matches viewports 600px wide and up. */
@media (width >= 600px) {
.card {
padding: 24px;
}
}
/* Bounded-range rule: matches 400px through 1000px inclusive. */
@media (400px <= width <= 1000px) {
.card {
border-radius: 12px;
}
}If a browser does not understand the new operators, the entire @media block is skipped, so always pair production-critical layout rules with a min-width or max-width fallback for older Safari and Android Browser builds.
Range syntax only applies to features the spec marks as range type. Discrete features keep the equals-and-keyword form.
Range syntax is a clean win for modern browsers, but a small set of cross-engine quirks still bite real projects. The common pain points cover the Safari pre-16.4 gap, IE 11 fallbacks, sanitizer behavior, and Sass mixed-mode parsing.
In my experience, the trickiest production failure is the Safari 16.3 gap. A rule using (width >= 768px) renders perfectly in Chrome and Firefox, then silently drops on a tester's iPhone running iOS 16.2, and the bug looks like a CSS specificity issue. Always test the new syntax on real Safari builds before shipping.
With Baseline Widely Available status since September 2025, the honest 2026 guidance is to write range syntax natively and treat a build-time transform as an optional fallback, not a default requirement. A transform is only justified when your audience includes Safari or iOS below 16.4 (devices stuck on iOS 15 and earlier), Chromium below 104 (old Android WebView or enterprise fleets), or similar legacy long-tails. One nuance worth knowing: Firefox shipped feature-first comparisons like (width > 500px) back in Firefox 63, but full interval forms like (400px <= width <= 700px) required Firefox 102, so audit which form your stylesheet uses if you support old Firefox ESR builds.
When you do need the fallback, use PostCSS. The maintained plugin is @csstools/postcss-media-minmax, and the simplest path is postcss-preset-env, which includes that transform by default as the media-query-ranges feature and applies it only when your browserslist actually contains a browser that needs it. Avoid the older unscoped postcss-media-minmax package, which has not shipped a release since January 2021 and has been superseded by the @csstools fork.
/* You write modern range syntax: */
@media (400px <= width <= 1000px) {
.card {
padding: 24px;
}
}
/* The PostCSS transform outputs legacy syntax for old browsers: */
@media (min-width: 400px) and (max-width: 1000px) {
.card {
padding: 24px;
}
}The transform maps >= and <= directly onto min- and max- prefixes, so it covers inclusive bounds perfectly. Exclusive bounds like (width < 768px) compile to fractional values such as (max-width: 767.98px), the same 0.02px step Bootstrap uses, which restores the very hack the syntax was designed to remove, but only in the legacy output that old browsers see. Your source stays clean.
Range syntax pairs naturally with the rest of the modern responsive toolkit: viewport breakpoints for page-level layout, and CSS container queries for component-level responsiveness. For choosing the breakpoint values themselves, see media queries for standard devices.
All CSS media range syntax version numbers and platform notes in this guide come from these primary sources:
Author
Prince Dewani is a Community Contributor at TestMu AI specializing in AI agents, software testing, QA, and SEO. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI, and presented academic research on AI agents at PBCON-01. At TestMu AI, he has also carried out extensive cross-browser research on the support of modern web technologies such as WebGPU, WebAssembly, WebXR, WebGL2 and other web technologies, validating their compatibility and feature parity across major browsers and rendering engines through rigorous hands-on testing. Prince has hands-on experience building AI agent workflows using Anthropic Claude, Google Antigravity, n8n, LangChain, and other agentic frameworks, and works regularly with MCP and A2A protocols. He shares his work with 5,500+ QA engineers, developers, DevOps experts, tech leaders, and AI agent practitioners on LinkedIn.
Did you find this page helpful?
More Related Blogs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance