css: Better error reporting

I seem to mix up the order of 'longer hue' occasionally, so lets
throw a helpful error message if we see 'hue' first.
This commit is contained in:
Matthias Clasen 2024-06-16 10:10:42 -04:00
parent 763d620a23
commit f9cd30a859

View File

@ -994,6 +994,11 @@ parse_hue_interpolation (GtkCssParser *parser,
gtk_css_parser_consume_token (parser);
*interp = GTK_CSS_HUE_INTERPOLATION_DECREASING;
}
else if (gtk_css_token_is_ident (token, "hue"))
{
gtk_css_parser_error_syntax (parser, "'hue' goes after the interpolation method");
return FALSE;
}
else
{
*interp = GTK_CSS_HUE_INTERPOLATION_SHORTER;