Test whether a Sass function is defined

Viewed 3453

How can I test if a Sass function exists?


I have a Sass package that uses a custom Sass function. However, outside Ruby (e.g. libsass), that function may not be defined and a fallback is provided:

url: if($bootstrap-sass-asset-helper, twbs-font-path('name.eot'), 'name.eot')

I would like to set the value of $bootstrap-sass-asset-helper to true or false depending on whether twbs-font-path is declared.

2 Answers
Related