Skip to content

Commit 06da10b

Browse files
authored
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)
1 parent 175ebc6 commit 06da10b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

web_src/less/markup/content.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,18 @@
159159
.task-list-item {
160160
list-style-type: none;
161161
position: relative;
162+
line-height: 1.5rem;
163+
min-height: 1.5rem; // to render a checkbox list without content `- [ ]`, we need this min-height to make sure the <li> can be visible
162164

163165
input[type="checkbox"] {
164166
position: absolute;
165167
top: .25em;
166168
left: -1.6em;
167169
}
170+
171+
p {
172+
line-height: 1.5rem;
173+
}
168174
}
169175

170176
.task-list-item + .task-list-item {

0 commit comments

Comments
 (0)