mirror of https://github.com/go-gitea/gitea.git
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)
This commit is contained in:
parent
175ebc6f88
commit
06da10b9a1
|
@ -159,12 +159,18 @@
|
||||||
.task-list-item {
|
.task-list-item {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
position: relative;
|
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"] {
|
input[type="checkbox"] {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: .25em;
|
top: .25em;
|
||||||
left: -1.6em;
|
left: -1.6em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
line-height: 1.5rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.task-list-item + .task-list-item {
|
.task-list-item + .task-list-item {
|
||||||
|
|
Loading…
Reference in New Issue