feature_exists

feature_exists($feature)

Returns whether a feature exists in the current Sass runtime.

The following features are supported:

  • global-variable-shadowing indicates that a local variable will shadow a global variable unless !global is used.

  • extend-selector-pseudoclass indicates that @extend will reach into selector pseudoclasses like :not.

  • units-level-3 indicates full support for unit arithmetic using units defined in the Values and Units Level 3 spec.

  • at-error indicates that the Sass @error directive is supported.

Examples:

feature-exists(some-feature-that-exists) => true
feature-exists(what-is-this-i-dont-know) => false

Parameters:

  • $feature (String) The name of the feature

Returns:

  • (Bool) Whether the feature is supported in this version of Sass

Raises:

  • (ArgumentError) if $feature isn’t a string
doc_Sass
2016-11-11 13:09:07
Comments
Leave a Comment

Please login to continue.