meta.feature-exists($feature) returns a boolean: whether the current Sass implementation reports support for the named $feature string. Unrecognized names return false. Load it with @use "sass:meta".
Official docs say this helper is deprecated and should be avoided. Dart Sass emits deprecation warnings on every call. Prefer deleting checks; modern Dart Sass already covers the capabilities this function gated.
@use "sass:meta";
meta.feature-exists($feature); //=> boolean (deprecated)
meta.feature-exists("at-error"); // true
meta.feature-exists("unrecognized"); // false
// Global alias (legacy): feature-exists($feature)
// Prefer removing both forms in new projects
Pattern for legacy code: read the feature string → understand the boolean → plan removal rather than adding new branches.
Reference
Recognized Features
Official docs list these feature strings:
Feature string
Meaning
global-variable-shadowing
Local variables shadow globals unless marked !global
extend-selector-pseudoclass
@extend affects selectors nested in pseudo-classes like :not()
units-level3
Unit arithmetic supports CSS Values and Units Level 3 units
at-error
The @error rule is supported
custom-property
Custom property values only allow interpolation (not full Sass expressions)
Any other string
Returns false
Compiler-reported, not a guarantee.
A true/false answer is what that implementation reports for the string. Prefer deleting the check on modern Dart Sass instead of trusting long-term.
Migrate to member helpers when you need detection.
One line: when you see meta.feature-exists($feature) in old code, plan to remove it rather than extend it.
Practice
Compile Notes
Practical checklist:
checklist.txt
1. Recognize feature-exists as deprecated
2. Expect Dart Sass deprecation warnings
3. Prefer deleting the check on modern Dart Sass
4. Use function-exists / mixin-exists / global-variable-exists instead
5. Do not invent new feature strings
Frequently Asked Questions
meta.feature-exists($feature) returns true if the current Sass compiler claims support for a named legacy feature string, or false for unrecognized names. It is deprecated and should not be used in new code.
Official Sass docs say this function is deprecated and should be avoided. No new feature strings were added for a long time, and modern Dart Sass already supports the capabilities these checks were meant to gate—so most calls can simply be removed.
Dart Sass emits deprecation warnings today. In Dart Sass 2.0.0, meta.feature-exists() is expected to throw, and the global feature-exists() name may be treated as a plain CSS function call.
Usually nothing—delete the check. For specific members, use meta.function-exists, meta.mixin-exists, or meta.global-variable-exists.
global-variable-shadowing, extend-selector-pseudoclass, units-level3, at-error, and custom-property. Any other string returns false.
Yes. feature-exists($feature) is the legacy global name. Prefer meta.feature-exists only while reading old code—and plan to remove both forms.