Numbered Lists Do Not Render Under Checkboxes

Steps To Reproduce

  1. Create a checkbox item
  2. Create an indented numbered list below (even just one)
  3. Toggle to reading view.

What I’m trying to do

I am trying to display a numbered list directly below a check box. Like how an unordered list is displayed under a checkbox. As the task I am creating needs steps.

Just like this but with numbers

Editing View:
image

Reading View:
image

Here is what it looks like when rendering with a numbered list.

Editing View:
image

Reading View:
image


Things I have tried

I have tried removing the indentation but it does not look what I want it to be. As it is not directly under the checkbox I intended it to be.

Editing View:
image

Reading View:
image

For now I am using a unordered list instead of a numbered list. But I really want to inform Obsidian of this for the future.

It looks like it is this margin here:

You could try something like this to tighten it up:

.markdown-rendered  ul.has-list-bullet {
    margin-bottom: 3px;
}

The endlessly helpful sailKite reminded me it is because

- [ ] there
1. some

are two different types of lists. You can see the same behavior here:

- hyphen ul
* asterisk ul

I am interested at your solution but it does not work. The margin remains the same.

What I Have Tried

  1. I have created a css file and copied the css inside vscode
    image
  2. I made sure to activate the css file with the other snippets.
  3. Then I tested the snippet using an example note.
    Editing View:
    image
    Reading View:
    image

Am I missing something?

The important is in the wrong place and missing a ! in your CSS.

In my test vault, !important isn’t necessary so you could use the original:

.markdown-rendered  ul.has-list-bullet {
    margin-bottom: 3px;
}

or one with !important if you think you need it.

.markdown-rendered  ul.has-list-bullet {
    margin-bottom: 3px !important;
}

Reading view:
CleanShot 2023-11-03 at 08.30.48

Thanks for pointing out what I was missing :slight_smile: I changed it immediately
image

Again, I made sure to check that the snippet is activated.

But it still would not work as intended.
[video-to-gif output image]

I started to think that maybe it is because of the new theme I am using and so I turned off the minimal theme.
image

But still, nothing changed.
image

Turning off the theme didn’t work so I turned off the other snippets that may be interfering with this snippet.

But still, nothing changed.
image

[video-to-gif output image]

I don’t know what else to do :confused:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.