-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
Plugins can call Sass.add_feature(feature_name) to expose their features and in doing so get the same feature detection benefits that Sass itself gets from this capability. Plugin features must begin with a dash to distinguish them from official features and ensure our namespace is not polluted.
- Loading branch information
There are no files selected for viewing
2 comments
on commit 1b45a55
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While writing my test, I needed to add a feature to ensure the test was working and it occurred to me that allowing plugins to expose their features good for the ecosystem. However, I now question whether sass-supports
is the right name for this function. Perhaps feature-exists
, feature-present
, or has-feature
would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how sass-supports
reads like "if sass supports blah", but I agree that it's a little weird with external features. I think I like feature-exists
best of the alternatives.
Nit: extra newline.