viz: align left offset for nested items (#13420)

This commit is contained in:
qazal
2025-11-23 14:22:51 +08:00
committed by GitHub
parent da0aa57a3b
commit 474a631877
2 changed files with 2 additions and 2 deletions

View File

@@ -56,7 +56,6 @@
}
ul > ul {
display: none;
margin-left: 6px;
}
ul.has-children > p::before {
content:"▸ ";

View File

@@ -675,7 +675,8 @@ async function main() {
while (stack.length && stack.at(-1).depth >= u.depth) stack.pop();
const list = stack.length > 0 ? stack.at(-1).li : ul;
u.li = list.appendChild(document.createElement("ul"));
u.li.id = `step-${i}-${j}`;
u.li.id = `step-${i}-${j}`
u.li.style.marginLeft = u.depth > 0 ? "calc(6px + 1ch)" : "6px";
const p = u.li.appendChild(document.createElement("p"));
p.appendChild(colored(`${u.name}`+(u.match_count ? ` - ${u.match_count}` : '')));
p.onclick = (e) => {