*Summary*:
The CSS *at-rule()* 
<https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@supports#at-rule>
 
function for the *@supports* 
<https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@supports> 
at-rule 
allows authors to detect browser support of specific at-rules. It can also 
be used with the *CSS.supports() 
<https://developer.mozilla.org/en-US/docs/Web/API/CSS/supports_static>* 
JavaScript 
method as well as in the *supports() 
<https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@import#supports-condition>*
 function 
of the *@import* 
<https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@import> 
at-rule. Together, these allow authors to conditionally write styles or 
execute code depending on browser support for specific at-rules. For 
example:

  /* Conditional styles */
  @supports at-rule(@scope) {
    @scope { /* ... */ }
  }
  
  /* Conditional import */
  @import "props.css" supports(at-rule(@property));
  
  /* Feature detection in JavaScript */
  if (CSS.supports("at-rule(@view-transition)")) { }

We intend to enable these functions in *Firefox Nightly* builds behind the 
*layout.css.supports.at-rule.enabled* pref.

*Bug*: 
Bug 1751188 - Implement at-rule for use with @supports 
<https://bugzilla.mozilla.org/show_bug.cgi?id=1751188>

*Specification*: 
https://drafts.csswg.org/css-conditional-5/#funcdef-supports-at-rule

*Standards Body*: 
CSSWG / W3C

*Platform Coverage*: 
All

*Preference*:
*layout.css.supports.at-rule.enabled* — Bug 2060754 
<https://bugzilla.mozilla.org/show_bug.cgi?id=2060754> to implement and 
enable in Nightly

*DevTools Bug*: 
N/A (supported by default in the at-rules panel of the Style Editor)

*Extensions Bug*: 
N/A

*Use Counter*: 
N/A

*Standards-Positions Discussion*: 
https://github.com/mozilla/standards-positions/issues/1310 — (no position)

*Other Browsers*:
- Blink: Shipped since Chrome 148
- WebKit: Implementation in progress (
https://bugs.webkit.org/show_bug.cgi?id=235400)

*web-platform-tests*:
https://wpt.fyi/results/css/css-conditional/js/supports-at-rule.html — Also 
adding an additional WPT file to test serialization of the *at-rule()* 
function.

-- 
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/b4186825-28cf-4da4-b827-f2c0e7350d55n%40mozilla.org.

Reply via email to