From 06da10b9a19831655d386bf06fc5d671df94b663 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Mon, 25 Oct 2021 17:02:39 +0800 Subject: [PATCH] Fix markdown checkbox rendering (#17427) We allow to render empty check list item - [ ], while GitHub doesn't allow. To make the rendering correct, we need tune the UI (the last PR #17413 uses absolute layout, which makes the empty checkbox item can not be displayed correctly) --- web_src/less/markup/content.less | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web_src/less/markup/content.less b/web_src/less/markup/content.less index 1678ff0fa..a21c44df1 100644 --- a/web_src/less/markup/content.less +++ b/web_src/less/markup/content.less @@ -159,12 +159,18 @@ .task-list-item { list-style-type: none; position: relative; + line-height: 1.5rem; + min-height: 1.5rem; // to render a checkbox list without content `- [ ]`, we need this min-height to make sure the
  • can be visible input[type="checkbox"] { position: absolute; top: .25em; left: -1.6em; } + + p { + line-height: 1.5rem; + } } .task-list-item + .task-list-item {