mirror of
https://github.com/sass/sass.git
synced 2024-09-21 10:37:22 +00:00
Code review
This commit is contained in:
parent
50c8817c36
commit
4fc5a9511a
@ -55,7 +55,7 @@ To execute a `@function` rule `rule`:
|
||||
|
||||
> This overrides the previous definition, if one exists.
|
||||
|
||||
* Set [the current import context][]'s function `name` to `function`.
|
||||
* Set [the current import context]'s function `name` to `function`.
|
||||
|
||||
> This happens regardless of whether or not it begins with `-` or `_`.
|
||||
|
||||
|
@ -108,6 +108,10 @@ This function is also available as a global function named `function-exists()`.
|
||||
|
||||
* If `$name` is not a string, throw an error.
|
||||
|
||||
* If `$name` is not an [`<ident-token>`], return false.
|
||||
|
||||
[`<ident-token>`]: https://drafts.csswg.org/css-syntax-3/#ident-token-diagram
|
||||
|
||||
* If `$module` is null:
|
||||
|
||||
* Return whether [resolving a function][] named `$name` returns null.
|
||||
@ -135,6 +139,8 @@ This function is also available as a global function named `get-function()`.
|
||||
|
||||
* If `$name` is not a string, throw an error.
|
||||
|
||||
* If `$name` is not an [`<ident-token>`], throw an error.
|
||||
|
||||
* If `$module` is null:
|
||||
|
||||
* If `$css` is falsey:
|
||||
@ -170,6 +176,8 @@ get-mixin($name, $module: null)
|
||||
|
||||
* If `$name` is not a string, throw an error.
|
||||
|
||||
* If `$name` is not an [`<ident-token>`], throw an error.
|
||||
|
||||
* If `$module` is null:
|
||||
|
||||
* Return the result of [resolving a mixin] named `$name`. If this returns
|
||||
@ -197,6 +205,10 @@ This function is also available as a global function named `global-variable-exis
|
||||
|
||||
* If `$name` is not a string, throw an error.
|
||||
|
||||
* If `$name` is not a [`PlainVariable`], return false.
|
||||
|
||||
[`PlainVariable`]: ../variables.md#syntax
|
||||
|
||||
* If `$module` is null:
|
||||
|
||||
* Return whether [resolving a variable][] named `$name`, ignoring local
|
||||
@ -239,6 +251,8 @@ This function is also available as a global function named `mixin-exists()`.
|
||||
|
||||
* If `$name` is not a string, throw an error.
|
||||
|
||||
* If `$name` is not an [`<ident-token>`], return false.
|
||||
|
||||
* If `$module` is null:
|
||||
|
||||
* Return whether [resolving a mixin] named `$name` returns null.
|
||||
@ -333,6 +347,8 @@ This function is also available as a global function named `variable-exists()`.
|
||||
|
||||
* If `$name` is not a string, throw an error.
|
||||
|
||||
* If `$name` is not a [`PlainVariable`], return false.
|
||||
|
||||
* If `$module` is null:
|
||||
|
||||
* Return whether [resolving a variable][] named `$name` returns null.
|
||||
|
@ -43,11 +43,11 @@ refer to the exact same instance of the same procedure.
|
||||
>
|
||||
> $a: meta.get-function(foo);
|
||||
>
|
||||
> @mixin foo {
|
||||
> @function foo {
|
||||
> @return red;
|
||||
> }
|
||||
>
|
||||
> $b: meta.get-mixin(foo);
|
||||
> $b: meta.get-function(foo);
|
||||
> ```
|
||||
>
|
||||
> Although every aspect of the two functions is the same, `$a != $b`, because
|
||||
|
Loading…
Reference in New Issue
Block a user