Numbered Lists Restarting at 00 After 99 in Live Preview/Reading Mode

Hello everyone,

I’m experiencing an issue with numbered lists in Obsidian.

What I’m trying to do

When I create a list and it reaches item 99, the next item displays as “00” instead of “100” in both Live Preview and Reading modes. This seems to be a display issue rather than a markdown problem, as the actual markdown code remains correct.

Has anyone else encountered this problem? Are there any known solutions or workarounds to ensure that numbered lists display correctly beyond item 99?

Any help or guidance would be greatly appreciated!

Things I have tried

I have searched the forums and google but couldn’t find this problem.


Sorry I couldn’tfindhow to edit my OP but here are some screenshots.

Can’t reproduce this behaviour. I’ve tried with simple lists, blockquoted lists, blockquoted tasks lists… And neither display this behaviour in neither live preview nor reading mode.

Which Obsidian version are you running on? Please report back from either Show debug info or the about section, and do include the installer version.

It might be that some plugin are causing you some grief, and needs to be updated as well. But I can’t reproduce it based on what you’ve written so far.

Thank you very mich @holroy for taking the time to try to reproduce this behaviour. Apologizes maybe I didn’t provide enough details.

The problem arises in a callout. Based on your input I tried to create a test note in a fresh vault without any additional plugin.
If I remove the checkmarks the problem persists. If I remove the callout the problem disappears and expected numbers (>99) are displaying.

Can you reproduce this behaviour on your side?

For reference, I’m on v. 1.8.9 (installer : v.1.7.7)

Thank you ^^

I think there was a similar problem someone was having, where it had to do with callouts or css cutting off the first character.

I had reported similar issue.
In my case, it had to do with fonts.

Maybe this should be turned into a bug report? I have no idea how to do this though, if that’s actually the next step.

One would need to be able to reproduce it to make a bug report. As it is, it’s not.

I did try with block quotes and it worked nicely, I’ll see if there is a difference when using a callout if I get around to it.

One thing for you to try out is whether you’re able to reproduce it in the sandbox vault or not. If not, then it’s an issue with some of your CSS snippets, theme and/or plugins.

You should also strongly consider updating the installer version of your installation. That is, you should reinstall Obsidian from the downloaded version. It could be related to your installer version being on 1.7.7. A reinstall should not affect any of your vaults, but as always it’s good to make regular backups of your vault in any case.

Looks like list numbers with 3 or more digits in callouts are too wide for the space is all.

@TheFlow, this CSS fixes it in the sandbox:

.callout-content {
	padding-left: var(--size-4-3);
}

You can test with this callout:

> [!NOTE]
> 98. [ ] asdf
> 99. [ ] asdf
> 100. [ ] asdf
> 101. [ ] asdf
> 102. [ ] asdf

Before:

After:

I was a little curious, so I did some tests.

When I opened the Sandbox Vault with the 1.8.9 installer and created an ordered list in the callout, the numbers over 3 digits did indeed disappear.

My previous bug report was for 2 or more digits disappearing, which happens when certain font families are applied.

  • Cascadia Mono
  • Consolas
  • Roboto Mono
  • Source Code Pro
  • JetBrains Mono
  • and more…

I thought that the 3+ digit issue might also be related to font families, so I tested various font families and almost all of them made the 3+ digit numbers disappear.

The only font family tested that could display more than 3 digits was “Tempus Sans ITC” in Windows. Also, “Gayathri” in Ubuntu could display more than 3 digits.

It is strange that some people can reproduce and others cannot. Tested in the following environments with the same results.

  • Windows11
  • Windows11 (Hyper-V)
  • Ubuntu2204
  • Android15

Have anyone confirmed whether the digits are actually being reset, or is this merely an overflow issue, where they’re hidden from view? Depending on how the overflow is defined, I reckon it could end up either showing the first or last part of the digits.

It’ll be a very different issue if the digits are actually removed/disappeared vs the styling is hiding them. Has even anyone, capable of reproducing this, looked at the DOM to verify either the presence or disappearance of the elements?

Have anyone confirmed whether the digits are actually being reset, or is this merely an overflow issue, where they’re hidden from view?

I was able to reproduce. The digits are not being reset. They are merely hidden from view.

Increasing the padding around the callout content (inside the callout) makes the digits visible.

CSS and screenshots that demonstrate it: Numbered Lists Restarting at 00 After 99 in Live Preview/Reading Mode - #9 by dawni. In my opinion, not a bug, and CSS can easily solve the help request. (But of course I’m not a dev, who maybe they see it differently. And the person who asked hasn’t yet responded about whether the code works for them.)

1 Like

Thank you @holroy for your advices. I wasn’t aware of the sandbox vault existence, but I did a similar try by creating a fresh vault without any plugin.

I wasn’t aware of this installer version thing either. I did try a fresh install over existing one, it doesn’t solve the problem.

I can confirm this is a display “bug”, as the numbers are showing correctly in source mode (see screenshot in my 2nd post).

I just discovered that the numbers show correctly in certain themes (I tried AnuPpucin). Problem was in the Default theme.

Thank you @dawni, your snippet does solve the display bug.

BTW, would you mind explaining to me how to understand the var(--size-4-3) number? I did a search about it but wasn’t able to figure it out.

I’m no one to tell whether this must be classified as a bug, but imho for the basic end user like me, not having numbers >99 display in the default theme is a bug.

Glad it worked for you!

That variable is specific to Obsidian. In the default theme, it’s equal to 12px (4 x 3). The devs made CSS variables to help keep appearances consistent. Here’s where they’re documented: CSS variables - Developer Documentation

So if you use use a specific value (a “literal” expression) instead of a variable, then in one theme you’ll get the result you want. But if you change themes, your literal might not match the new appearance. Referencing a variable instead of using a literal can help with consistency.

In this case, I wouldn’t guess that many theme creators are changing the values of the size variables, so using 12px is probably fine too. But I’ve never installed an Obsidian theme, so I’m the wrong person to guess about what’s going on out there in the world. :person_shrugging:

1 Like

Thank you. Following your link, I found on the subpage “Spacing” the rationale behind the use of multiples of 4 in spacing variables, makes full sense to me now.

Sorrry I can’t seem to post a link :S