[Forward With] Only !default variables defer to outer configuration (#2785)

This commit is contained in:
Natalie Weizenbaum 2019-12-03 04:48:04 -08:00 committed by GitHub
parent 338532b487
commit 57792117aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 9 deletions

View File

@ -0,0 +1,3 @@
## Draft 1.1
* Only `!default` variables defer to the pre-existing configuration.

View File

@ -1,6 +1,7 @@
# Reconfigurable Modules: Draft 1
# Reconfigurable Modules: Draft 1.1
*([Issues](https://github.com/sass/sass/issues/2744))*
*([Issues](https://github.com/sass/sass/issues/2744),
[Changelog](forward-with.changes.md))*
## Table of Contents
@ -190,15 +191,14 @@ Given a source file `file`, a configuration `config`, and an import context
* For each `ForwardWithArgument` `argument` in this clause:
* If a variable exists in `rule-config` with the same name as `argument`'s
identifier, do nothing.
* If `argument` has a `!default` flag and a variable exists in
`rule-config` with the same name as `argument`'s identifier, do nothing.
* Otherwise:
* Otherwise, let `value` be the result of evaluating `argument`'s
expression.
* Let `value` be the result of evaluating `argument`'s expression.
* Add a variable to `rule-config` with the same name as `argument`'s
identifier, and with `value` as its value.
* Add a variable to `rule-config` with the same name as `argument`'s
identifier, and with `value` as its value.
* Let `forwarded` be the result of [loading][] the module with `rule`'s URL
and `rule-config`.