It looks like style() container queries are enabled in @firefoxnightly - this is one of the features I'm looking forward to most. Especially with range queries starting to roll out.

@ container style(--progress > 80%) {
background: green;
}

https://bugzilla.mozilla.org/show_bug.cgi?id=2014404

2014404 - Enable the `layout.css.style-queries.enabled` pref on Nightly

RESOLVED (jfkthame) in Core - CSS Parsing and Computation. Last updated 2026-02-04.

The at-rule has to query a parent element, but the eventual inline if(style()) combo doesn't have that limitation.

background: if(
style(--progress > 80%): green;
else: red
);

More from @Una here: https://una.im/range-style-queries/

una.im | Range Syntax for Style Queries

Learn how to use the new range syntax for CSS style queries and the if() function.