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> {
|
||||
match self {
|
||||
Self::Builtin(f, ..) => f.0(args, scope, super_selector),
|
||||
// todo: superselector
|
||||
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 {\n b: #ff1a1a;\n}\n"
|
||||
);
|
||||
// test!(
|
||||
// call_user_defined_super_selector,
|
||||
// "@function user-defined() {\n @return &;\n}\n
|
||||
// a {b: call(get-function(user-defined));}",
|
||||
// "a {\n b: a;\n}\n"
|
||||
// );
|
||||
test!(
|
||||
call_user_defined_super_selector,
|
||||
"@function user-defined() {\n @return &;\n}\n
|
||||
a {b: call(get-function(user-defined));}",
|
||||
"a {\n b: a;\n}\n"
|
||||
);
|
||||
error!(
|
||||
undefined_function,
|
||||
"a {color: get-function(foo);}", "Error: Function not found: foo"
|
||||
|
Loading…
x
Reference in New Issue
Block a user