css: Deprecate our own color functions
We will soon have new standards-conformant color functions from the css-colors-5 spec, so these can be phased out.
This commit is contained in:
@@ -1789,6 +1789,8 @@ gtk_css_color_value_parse (GtkCssParser *parser)
|
||||
{
|
||||
ColorFunctionData data = { NULL, };
|
||||
|
||||
gtk_css_parser_warn_deprecated (parser, "lighter() is deprecated");
|
||||
|
||||
if (gtk_css_parser_consume_function (parser, 1, 1, parse_color_number, &data))
|
||||
value = gtk_css_color_value_new_shade (data.color, 1.3);
|
||||
else
|
||||
@@ -1801,6 +1803,8 @@ gtk_css_color_value_parse (GtkCssParser *parser)
|
||||
{
|
||||
ColorFunctionData data = { NULL, };
|
||||
|
||||
gtk_css_parser_warn_deprecated (parser, "darker() is deprecated");
|
||||
|
||||
if (gtk_css_parser_consume_function (parser, 1, 1, parse_color_number, &data))
|
||||
value = gtk_css_color_value_new_shade (data.color, 0.7);
|
||||
else
|
||||
@@ -1813,6 +1817,8 @@ gtk_css_color_value_parse (GtkCssParser *parser)
|
||||
{
|
||||
ColorFunctionData data = { NULL, };
|
||||
|
||||
gtk_css_parser_warn_deprecated (parser, "shade() is deprecated");
|
||||
|
||||
if (gtk_css_parser_consume_function (parser, 2, 2, parse_color_number, &data))
|
||||
value = gtk_css_color_value_new_shade (data.color, data.value);
|
||||
else
|
||||
@@ -1825,6 +1831,8 @@ gtk_css_color_value_parse (GtkCssParser *parser)
|
||||
{
|
||||
ColorFunctionData data = { NULL, };
|
||||
|
||||
gtk_css_parser_warn_deprecated (parser, "alpha() is deprecated");
|
||||
|
||||
if (gtk_css_parser_consume_function (parser, 2, 2, parse_color_number, &data))
|
||||
value = gtk_css_color_value_new_alpha (data.color, data.value);
|
||||
else
|
||||
@@ -1837,6 +1845,8 @@ gtk_css_color_value_parse (GtkCssParser *parser)
|
||||
{
|
||||
ColorFunctionData data = { NULL, };
|
||||
|
||||
gtk_css_parser_warn_deprecated (parser, "mix() is deprecated");
|
||||
|
||||
if (gtk_css_parser_consume_function (parser, 3, 3, parse_legacy_mix, &data))
|
||||
value = gtk_css_color_value_new_mix (data.color, data.color2, data.value);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user