emitting get-function is an error
This commit is contained in:
parent
a746d81013
commit
7db57054e1
@ -137,8 +137,13 @@ impl Value {
|
|||||||
)
|
)
|
||||||
.into())
|
.into())
|
||||||
}
|
}
|
||||||
// TODO: should to_css_string on function fail?
|
Self::Function(..) => {
|
||||||
Self::Function(func) => format!("get-function(\"{}\")", func.name()),
|
return Err((
|
||||||
|
format!("{} isn't a valid CSS value.", self.inspect(span)?),
|
||||||
|
span,
|
||||||
|
)
|
||||||
|
.into())
|
||||||
|
}
|
||||||
Self::List(vals, sep, brackets) => match brackets {
|
Self::List(vals, sep, brackets) => match brackets {
|
||||||
Brackets::None => vals
|
Brackets::None => vals
|
||||||
.iter()
|
.iter()
|
||||||
|
@ -99,3 +99,8 @@ error!(
|
|||||||
non_function_call,
|
non_function_call,
|
||||||
"a {color: call(4);}", "Error: $function: 4 is not a function reference."
|
"a {color: call(4);}", "Error: $function: 4 is not a function reference."
|
||||||
);
|
);
|
||||||
|
error!(
|
||||||
|
emit_plain_get_function_is_invalid_css,
|
||||||
|
"a {color: get-function(lighten);}",
|
||||||
|
"Error: get-function(\"lighten\") isn't a valid CSS value."
|
||||||
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user