mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 05:50:10 +00:00
csscolorvalue: Fix oklab() percentage range
This commit is contained in:
parent
6602ac5eae
commit
dc1ff3c2e3
@ -1432,7 +1432,11 @@ parse_ok_ab_value (GtkCssParser *parser,
|
||||
if (data->values[idx] == NULL)
|
||||
return FALSE;
|
||||
|
||||
data->v[idx] = gtk_css_number_value_get_canonical (data->values[idx], 0.4);
|
||||
data->v[idx] = gtk_css_number_value_get_canonical (data->values[idx], 0.8);
|
||||
|
||||
/* gtk_css_number_value_get_canonical() doesn't let us specify what 0% is */
|
||||
if (gtk_css_number_value_has_percent (data->values[idx]))
|
||||
data->v[idx] -= 0.4;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -123,3 +123,11 @@ ad {
|
||||
ae {
|
||||
color: hwb(200 10 90 / 0.5);
|
||||
}
|
||||
|
||||
af {
|
||||
color: oklab(0% 0% 0% / 0%);
|
||||
}
|
||||
|
||||
ag {
|
||||
color: oklab(100% 100% 100% / 100%);
|
||||
}
|
||||
|
@ -123,3 +123,11 @@ ad {
|
||||
ae {
|
||||
color: rgba(26,26,26,0.5);
|
||||
}
|
||||
|
||||
af {
|
||||
color: oklab(0 -0.4 -0.4 / 0);
|
||||
}
|
||||
|
||||
ag {
|
||||
color: oklab(1 0.4 0.4);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user