From 4842f7a3de353cff2ddfadd800708afdbe59eee0 Mon Sep 17 00:00:00 2001 From: hide24 Date: Mon, 16 Mar 2026 16:24:34 +0900 Subject: [PATCH] wiki: Fix list rendering with heading syntax --- website/static/css/pages/wiki-page.css | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/website/static/css/pages/wiki-page.css b/website/static/css/pages/wiki-page.css index 6928bdc8d83..49658095dfa 100644 --- a/website/static/css/pages/wiki-page.css +++ b/website/static/css/pages/wiki-page.css @@ -449,6 +449,29 @@ select.form-control { list-style-type: disc; } +.milkdown .editor ul li:has(>h1), +.milkdown .editor ul li:has(>h2), +.milkdown .editor ul li:has(>h3), +.milkdown .editor ul li:has(>h4), +.milkdown .editor ul li:has(>h5), +.milkdown .editor ul li:has(>h6) { + list-style-type: disc !important; +} + +/* Fallback: Add bullet point using ::before on li when it contains a heading */ +.milkdown .editor ul li:has(>h1)::before, +.milkdown .editor ul li:has(>h2)::before, +.milkdown .editor ul li:has(>h3)::before, +.milkdown .editor ul li:has(>h4)::before, +.milkdown .editor ul li:has(>h5)::before, +.milkdown .editor ul li:has(>h6)::before { + content: "•"; + display: inline-block; + width: 1em; + margin-left: -1em; + margin-right: 0.5em; +} + .milkdown .editor li[data-list-type="ordered"] { list-style-type: decimal; } @@ -532,4 +555,4 @@ li[name="WikiImportOperationPerItem"] { .milkdown td { border: 1px solid #ccc; padding: 8px; -} \ No newline at end of file +}