mirror of
https://github.com/sass/sass.git
synced 2024-09-21 10:37:22 +00:00
[Module System] Properly rename config variables for "@forward as"
Closes #70
This commit is contained in:
parent
9ec3160eac
commit
753bbd8a8d
@ -35,6 +35,9 @@
|
||||
to load `foo.scss.import` and `@import "foo"` doesn't try to load
|
||||
`foo.import/index.scss`.
|
||||
|
||||
* Rename configuration variables when they're passed to a forwarded module with
|
||||
an `AsClause`.
|
||||
|
||||
* Only allow top-level members to shadow forwarded members.
|
||||
|
||||
* Clean up the way "Forwarding Modules" is invoked.
|
||||
|
@ -1059,10 +1059,25 @@ Given a source file `file`, a [configuration](#configuration) `config`, and an
|
||||
|
||||
* When a `@forward` rule `rule` is encountered:
|
||||
|
||||
* Let `forwarded` be the result of [loading](#loading-modules) the module
|
||||
with `rule`'s URL and `config`.
|
||||
* If `rule` has an `AsClause` with identifier `prefix`:
|
||||
|
||||
* [Forward `forwarded`](#forwarding-modules) with `file` through `module`.
|
||||
* Let `rule-config` be an empty configuration.
|
||||
|
||||
* For each variable `variable` in `config`:
|
||||
|
||||
* If `variable`'s name begins with `prefix`:
|
||||
|
||||
* Let `suffix` be the portion of `variable`'s name after `prefix`.
|
||||
|
||||
* Add a variable to `rule-config` with the name `suffix` and with the
|
||||
same value as `variable`.
|
||||
|
||||
* Otherwise, let `rule-config` be `config`.
|
||||
|
||||
* Let `forwarded` be the result of [loading](#loading-modules) the module with
|
||||
`rule`'s URL and `rule-config`.
|
||||
|
||||
* [Forward `forwarded`](#forwarding-modules) with `file` through `module`.
|
||||
|
||||
* When an `@import` rule is encountered,
|
||||
[import the file](#importing-files) it refers to with `import`.
|
||||
|
Loading…
Reference in New Issue
Block a user