test for superselector in function called from get-function
This commit is contained in:
parent
56f198f2a7
commit
eb690b9adf
@ -59,7 +59,6 @@ impl SassFunction {
|
|||||||
) -> SassResult<Value> {
|
) -> SassResult<Value> {
|
||||||
match self {
|
match self {
|
||||||
Self::Builtin(f, ..) => f.0(args, scope, super_selector),
|
Self::Builtin(f, ..) => f.0(args, scope, super_selector),
|
||||||
// todo: superselector
|
|
||||||
Self::UserDefined(f, ..) => f.eval(args, scope, super_selector),
|
Self::UserDefined(f, ..) => f.eval(args, scope, super_selector),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,12 +79,12 @@ test!(
|
|||||||
"a {b: call(get-function(lighten), $color: red, $amount: 5);}",
|
"a {b: call(get-function(lighten), $color: red, $amount: 5);}",
|
||||||
"a {\n b: #ff1a1a;\n}\n"
|
"a {\n b: #ff1a1a;\n}\n"
|
||||||
);
|
);
|
||||||
// test!(
|
test!(
|
||||||
// call_user_defined_super_selector,
|
call_user_defined_super_selector,
|
||||||
// "@function user-defined() {\n @return &;\n}\n
|
"@function user-defined() {\n @return &;\n}\n
|
||||||
// a {b: call(get-function(user-defined));}",
|
a {b: call(get-function(user-defined));}",
|
||||||
// "a {\n b: a;\n}\n"
|
"a {\n b: a;\n}\n"
|
||||||
// );
|
);
|
||||||
error!(
|
error!(
|
||||||
undefined_function,
|
undefined_function,
|
||||||
"a {color: get-function(foo);}", "Error: Function not found: foo"
|
"a {color: get-function(foo);}", "Error: Function not found: foo"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user