Skip to content

Commit

Permalink
Document this.fromImport for the JS API (sass#540)
Browse files Browse the repository at this point in the history
  • Loading branch information
Israel-4Ever committed May 17, 2021
1 parent 4eeeca4 commit c093829
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions source/documentation/js-api.html.md.erb
Expand Up @@ -788,6 +788,14 @@ Imports are resolved by trying, in order:
* Each load path specified in the `SASS_PATH` environment variable, which
should be semicolon-separated on Windows and colon-separated elsewhere.

<% impl_status dart: '1.33.0', node: false, feature: "this.fromImport" %>

An importer can determine whether it's being called from an `@import` rule by
checking `this.fromImport`. This should *only* be used for determining whether
or not to load [import-only files].

[import-only files]: https://sass-lang.com/documentation/at-rules/import#import-only-files

```js
sass.render({
file: "style.scss",
Expand Down

0 comments on commit c093829

Please sign in to comment.