mirror of
https://github.com/sass/sass.git
synced 2024-09-21 10:37:22 +00:00
Don't allow positional module mixin arguments.
This commit is contained in:
parent
5c083237d1
commit
46beceff62
@ -13,6 +13,8 @@
|
||||
Downstream modules inherently share the same semantics for selector names, and
|
||||
extensions are an aspect of those semantics.
|
||||
|
||||
* Don't allow module mixin arguments to be passed by position.
|
||||
|
||||
## Draft 1
|
||||
|
||||
* Initial draft.
|
||||
|
11
README.md
11
README.md
@ -735,8 +735,15 @@ file's namespace.
|
||||
The module mixin's arguments are derived from the module's members (which we can
|
||||
determine without executing the module). For every variable in module that has a
|
||||
`!default` flag, the module mixin has an argument with the same name and a
|
||||
default value of `null`. These arguments are in the order the variables are
|
||||
defined, although users should be strongly encouraged to only pass them by name.
|
||||
default value of `null`. The mixin does not allow positional arguments, nor does
|
||||
it allow named arguments that are not derived from variables.
|
||||
|
||||
> **Design note**:
|
||||
>
|
||||
> It may become useful to provide the ability to customize the behavior of
|
||||
> module mixins at the language level. It may be wise to define a convention for
|
||||
> reserved argument names so that we can add arguments to all module mixins in
|
||||
> the future. It's not clear what a good convention would be for this, though.
|
||||
|
||||
When this mixin is included:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user