Skip to content

Absolute positioned checkboxes overlay floated elements #26870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Sep 30, 2023
26 changes: 16 additions & 10 deletions web_src/css/markup/content.css
Original file line number Diff line number Diff line change
Expand Up @@ -155,23 +155,29 @@

.markup .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 */
}

.markup .task-list-item p + ul {
margin-top: 16px;
}

.markup .task-list-item input[type="checkbox"] {
position: absolute;
top: 0.25em;
left: -1.6em;
margin: 0 .3em .25em -1.4em;
vertical-align: middle;
padding: 0;
}

.markup .task-list-item input[type="checkbox"] + p {
margin-left: -0.2em;
display: inline;
}

.markup .task-list-item p {
line-height: 1.5rem;
.markup .task-list-item > p {
margin-inline: 16px;
}

.markup .task-list-item + .task-list-item {
margin-top: 3px;
margin-top: 4px;
}

.markup input[type="checkbox"] {
Expand Down Expand Up @@ -327,7 +333,7 @@

.markup img[align="left"],
.markup video[align="left"] {
padding-right: 20px;
padding-right: 28px;
}

.markup .emoji {
Expand Down