tag.classList.add("tag");
tag.setAttribute("tabindex", "0");
hashHue(tagName).then((hue) => (tag.style.backgroundColor = `hsl(${hue},90%,45%)`));
+ for (const child of task.getElementsByClassName("tag")) {
+ if (tagName > child.textContent!) {
+ task.insertBefore(tag, child);
+ return tag;
+ }
+ }
task.appendChild(tag);
return tag;
},