support single arg special color fns
This commit is contained in:
parent
1e2e32140b
commit
2a7f0b6dbc
@ -23,6 +23,7 @@ fn inner_hsl(name: &'static str, mut args: CallArgs, parser: &mut Parser) -> Sas
|
||||
if len == 1 {
|
||||
let mut channels = match args.get_err(0, "channels")? {
|
||||
Value::List(v, ..) => v,
|
||||
v if v.is_special_function() => vec![v],
|
||||
_ => return Err(("Missing argument $channels.", args.span()).into()),
|
||||
};
|
||||
|
||||
|
@ -25,6 +25,7 @@ fn inner_rgb(name: &'static str, mut args: CallArgs, parser: &mut Parser) -> Sas
|
||||
if len == 1 {
|
||||
let mut channels = match args.get_err(0, "channels")? {
|
||||
Value::List(v, ..) => v,
|
||||
v if v.is_special_function() => vec![v],
|
||||
_ => return Err(("Missing argument $channels.", args.span()).into()),
|
||||
};
|
||||
|
||||
|
@ -757,6 +757,11 @@ test!(
|
||||
"a {\n color: hsl(1, 0.02, max(0.4));\n}\n",
|
||||
"a {\n color: hsl(1, 0.02, max(0.4));\n}\n"
|
||||
);
|
||||
test!(
|
||||
hsla_special_fn_1_arg_is_not_list,
|
||||
"a {\n color: hsla(var(--foo));\n}\n",
|
||||
"a {\n color: hsla(var(--foo));\n}\n"
|
||||
);
|
||||
test!(
|
||||
#[ignore = "we do not check if interpolation occurred"]
|
||||
interpolated_named_color_is_not_color,
|
||||
|
Loading…
x
Reference in New Issue
Block a user