add ":" to prop names in css autocomplete menu

This commit is contained in:
tophf 2020-05-01 08:29:45 +03:00
parent 81b6137d8a
commit 9a223a0167

View File

@ -372,7 +372,13 @@ CodeMirror.hint && (() => {
}
if (!editor || !style || !style.includes(USO_VAR)) {
return originalHelper(cm);
// add ":" after a property name
const res = originalHelper(cm);
const state = res && cm.getTokenAt(pos).state.state;
if (state === 'block' || state === 'maybeprop') {
res.list = res.list.map(str => str + ': ');
}
return res;
}
// USO vars in usercss mode editor