Ordered list with >=100 items omits first digit of ordinal #1607

Closed
opened 2026-02-05 01:24:27 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @wlabarron on GitHub (Mar 23, 2020).

Describe the bug
When an ordered list has more than 100 items, the first digit of the number is hidden - so “100” displays as “00”, “101” displays as “01”.

Steps To Reproduce
Create an ordered list of 100 or more items.

Expected behavior
Numbers should appear fully, without missing digits.

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v0.28.3
  • PHP Version: 7.3
  • Hosting Method (Nginx/Apache/Docker): Apache
Originally created by @wlabarron on GitHub (Mar 23, 2020). **Describe the bug** When an ordered list has more than 100 items, the first digit of the number is hidden - so “100” displays as “00”, “101” displays as “01”. **Steps To Reproduce** Create an ordered list of 100 or more items. **Expected behavior** Numbers should appear fully, without missing digits. **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): v0.28.3 - PHP Version: 7.3 - Hosting Method (Nginx/Apache/Docker): Apache
OVERLORD added the 🐛 Bug🎨 Design💻 Front-End labels 2026-02-05 01:24:27 +03:00
Author
Owner

@james-geiger commented on GitHub (Mar 23, 2020):

@wlabarron Could you post a screenshot of what it looks like on your machine?

I did this on my Dev instance, and it worked as expected:

image

@james-geiger commented on GitHub (Mar 23, 2020): @wlabarron Could you post a screenshot of what it looks like on your machine? I did this on my Dev instance, and it worked as expected: ![image](https://user-images.githubusercontent.com/15711820/77328356-67edb480-6cea-11ea-8d00-c680f3e35e82.png)
Author
Owner

@wlabarron commented on GitHub (Mar 23, 2020):

Please excuse the image being so thin, I'm not sure how public the content is allowed to be. The screenshot is items 98-105. Could it be because in the Markdown editor I've added headings in between some items, and it's tripped something up somewhere?

Screenshot 2020-03-23 at 2 50 32 pm
@wlabarron commented on GitHub (Mar 23, 2020): Please excuse the image being so thin, I'm not sure how public the content is allowed to be. The screenshot is items 98-105. Could it be because in the Markdown editor I've added headings in between some items, and it's tripped something up somewhere? <img width="65" alt="Screenshot 2020-03-23 at 2 50 32 pm" src="https://user-images.githubusercontent.com/16035785/77329564-0b07f380-6d16-11ea-8f67-b7309bda3512.png">
Author
Owner

@james-geiger commented on GitHub (Mar 23, 2020):

@wlabarron I'm really trying to break this:

image

One important thing to understand is that BookStack is just generating the HTML markup that is then interpreted by your browser. This is the markup that was generated for the screenshot above:

image

This most likely has something to do with CSS. In this screenshot, I've manually overridden the left-padding on the <ol> element, creating what appears to be a truncation:

image

Have you applied any style overrides that could have caused this to display improperly?

@james-geiger commented on GitHub (Mar 23, 2020): @wlabarron I'm really trying to break this: ![image](https://user-images.githubusercontent.com/15711820/77331785-31feff00-6cef-11ea-97ae-85d733856b3b.png) One important thing to understand is that BookStack is just generating the HTML markup that is then interpreted by your browser. This is the markup that was generated for the screenshot above: ![image](https://user-images.githubusercontent.com/15711820/77332217-c49f9e00-6cef-11ea-9ccd-7c0521e0db38.png) This most likely has something to do with CSS. In this screenshot, I've manually overridden the left-padding on the `<ol>` element, creating what appears to be a truncation: ![image](https://user-images.githubusercontent.com/15711820/77332507-2233ea80-6cf0-11ea-8423-010ac363c230.png) Have you applied any style overrides that could have caused this to display improperly?
Author
Owner

@wlabarron commented on GitHub (Mar 23, 2020):

Thank you for investigating this. I've applied no style overrides, just changed the theme colour in Settings.

The HTML generated (with my data removed) is:

<h4 id="bkmrk-title">Title</h4>
<ol id="bkmrk-item-1" start="104">
   <li>Item 1</li>
   <li>Item 2</li>
</ol>

I've just been playing and found that by using the Inspector in my browser (Safari) to remove the padding: 0; which is applied to html, body, div, span, applet, object, and many other things, and removing the padding-left: 32px; which is applied to ol makes the numbers appear properly. Furthermore, it displays correctly with no changes in Firefox. Perhaps a Safari bug?

@wlabarron commented on GitHub (Mar 23, 2020): Thank you for investigating this. I've applied no style overrides, just changed the theme colour in Settings. The HTML generated (with my data removed) is: ``` <h4 id="bkmrk-title">Title</h4> <ol id="bkmrk-item-1" start="104"> <li>Item 1</li> <li>Item 2</li> </ol> ``` I've just been playing and found that by using the Inspector in my browser (Safari) to remove the `padding: 0;` which is applied to `html, body, div, span, applet, object,` and many other things, and removing the `padding-left: 32px;` which is applied to `ol` makes the numbers appear properly. Furthermore, it displays correctly with no changes in Firefox. Perhaps a Safari bug?
Author
Owner

@james-geiger commented on GitHub (Mar 24, 2020):

Confirming that this seems to be a safari issue that does not exist in blink/gecko rendering engines.

image

@james-geiger commented on GitHub (Mar 24, 2020): Confirming that this seems to be a safari issue that does not exist in blink/gecko rendering engines. ![image](https://user-images.githubusercontent.com/15711820/77445183-c2564600-6dba-11ea-996d-6b47f7f99e3b.png)
Author
Owner

@ssddanbrown commented on GitHub (Apr 5, 2020):

Strangely, does not occur on gnome-web either. Can confirm I can see it on iPad though.

@ssddanbrown commented on GitHub (Apr 5, 2020): Strangely, does not occur on gnome-web either. Can confirm I can see it on iPad though.
Author
Owner

@ssddanbrown commented on GitHub (Apr 5, 2020):

There was a overflow: hidden; applied to all lists. Not sure why, probably the wrong fix to an issue a long time ago. Have now removed, will be part of the v0.29 release.

Think this was mainly affecting Safari as it's default font or text rendering has wider letter-spacing.

@ssddanbrown commented on GitHub (Apr 5, 2020): There was a `overflow: hidden;` applied to all lists. Not sure why, probably the wrong fix to an issue a long time ago. Have now removed, will be part of the v0.29 release. Think this was mainly affecting Safari as it's default font or text rendering has wider letter-spacing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1607