Skip to content
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

Nested items of a normal list item in a checklist are not indented further than the normal list item. #2550

Closed
crocket opened this issue Jan 31, 2018 · 4 comments
Assignees
Labels
bug v2.0.16 Issues resolved in the 2.0.16 release
Milestone

Comments

@crocket
Copy link

crocket commented Jan 31, 2018

* [ ] ABC
* [ ] BCD
* DEF
** ABC1
** BCD1

ABC1 and BCD1 should be indented further than DEF, but they are on the same level as DEF.

@mojavelinux
Copy link
Member

We drop the indentation on the checklist to make room for the check boxes. I could see how that means that we have to compensate for a nested list so it goes back to its normal position.

@bzgec
Copy link

bzgec commented Apr 28, 2021

I have a similar problem, but I want to nest Note_1 and Note_2 under Element_3. So that Note_1 and Note_2 are indented under Element_3.

image

Do you have any plans to enable indentations for cases like this?

@mojavelinux
Copy link
Member

I now understand the problem. The way in which the stylesheet is shifting the items in the checklist to make way for the checkbox is causing the nested blocks to lose the indentation (at least in part).

Here's a workaround you can add to your stylesheet:

ul.checklist {
  margin-left: 1.5em;
}
ul.checklist > li > p:first-child {
  margin-left: -0.875em;
}

I'll go ahead and apply this to the default stylesheet for an upcoming release.

@mojavelinux mojavelinux self-assigned this Apr 28, 2021
@mojavelinux mojavelinux added this to the v2.0.x milestone Apr 28, 2021
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Apr 28, 2021
@crocket
Copy link
Author

crocket commented May 2, 2021

Bravo.

@mojavelinux mojavelinux added the v2.0.16 Issues resolved in the 2.0.16 release label May 5, 2021
ggrossetie pushed a commit to ggrossetie/asciidoctor that referenced this issue Jun 12, 2021
mojavelinux added a commit that referenced this issue Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug v2.0.16 Issues resolved in the 2.0.16 release
Projects
None yet
Development

No branches or pull requests

3 participants