autocomplete-css: Put implicit values last

(This commit should just be re-arranging the values,
so as to put the implicit ones last.)

These implicit values are the same for all properties.

I find it more useful to view the property-specific values first,
since users may not actually know what property-specific values exist
for a given CSS property, and these implicit values are *always*
allowed... (I think they are, anyway).

This shows those property-specific values first, better advertising
what options are actually available to use. (Besides that, as far as I
know, the implicit "inherit", "initial", "unset" values are not as
commonly used as the property-specific values anyway.)
This commit is contained in:
DeeDeeG 2023-03-03 21:33:34 -05:00
parent 1ad19ceb7d
commit 4eb9758ab6
2 changed files with 1210 additions and 1207 deletions

File diff suppressed because it is too large Load Diff

View File

@ -181,13 +181,14 @@ function getValuesOfProp(value, allValues) {
// Like mentioned above `value` = "value1 | value2 | <valueGroupName>"
// https://developer.mozilla.org/en-US/docs/Web/CSS/Value_definition_syntax
// We will first insert the implicitly defined keywords that apply to all CSS properties
let values = [ "inherit", "initial", "unset" ];
// We will at least supply the implicitly defined keywords that apply to all CSS properties
let implicitValues = [ "inherit", "initial", "unset" ];
if (!value || value.length < 0) {
return values;
return implicitValues;
}
let values = [];
let parser = new CSSParser(value);
let rawArrayValues = parser.parse();
@ -205,6 +206,8 @@ function getValuesOfProp(value, allValues) {
}
}
// Add the implicit values to the end...
values = values.concat(implicitValues);
return values;
}