]> source.dussan.org Git - gitea.git/commitdiff
fix markdown checkbox rendering (#17425)
authorwxiaoguang <wxiaoguang@gmail.com>
Mon, 25 Oct 2021 07:40:38 +0000 (15:40 +0800)
committerGitHub <noreply@github.com>
Mon, 25 Oct 2021 07:40:38 +0000 (09:40 +0200)
web_src/less/markup/content.less

index e86e2d9f99dba68332f0d0a6ff6b29cb973df9c7..71e98652c8c347843e7a56d8f251a9444899239f 100644 (file)
   .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 <li> can be visible
 
     input[type="checkbox"] {
       position: absolute;
       top: .25em;
       left: -1.6em;
     }
+
+    p {
+      line-height: 1.5rem;
+    }
   }
 
   .task-list-item + .task-list-item {