fix css autocomplete sort order
This commit is contained in:
parent
3102738cfb
commit
58ae4704b2
|
@ -149,12 +149,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function initCssProps() {
|
function initCssProps() {
|
||||||
cssProps = addSuffix(cssMime.propertyKeywords).sort();
|
cssProps = addSuffix(cssMime.propertyKeywords);
|
||||||
cssMedia = [].concat(...Object.entries(cssMime).map(getMediaKeys).filter(Boolean)).sort();
|
cssMedia = [].concat(...Object.entries(cssMime).map(getMediaKeys).filter(Boolean)).sort();
|
||||||
}
|
}
|
||||||
|
|
||||||
function addSuffix(obj, suffix = ': ') {
|
function addSuffix(obj, suffix = ': ') {
|
||||||
return Object.keys(obj).map(k => k + suffix);
|
// Sorting first, otherwise "foo-bar:" would precede "foo:"
|
||||||
|
return Object.keys(obj).sort().map(k => k + suffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMediaKeys([k, v]) {
|
function getMediaKeys([k, v]) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user