Skip to content

Add ol override CSS for markdown-body - #31618

Merged
t3chguy merged 1 commit into
element-hq:developfrom
niamu:ol-large-number-cutoff-fix
Jan 5, 2026
Merged

Add ol override CSS for markdown-body#31618
t3chguy merged 1 commit into
element-hq:developfrom
niamu:ol-large-number-cutoff-fix

Conversation

@niamu

@niamu niamu commented Dec 31, 2025

Copy link
Copy Markdown
Contributor

Fixes #14621

This small CSS change affects the marker numbers on ordered lists.

Before this change:

Screenshot 2025-12-31 at 01 05 56

After this change:

Screenshot 2025-12-31 at 01 07 11

As you can see this visually changes the marker numbers to be positioned inside with the content which has the trade-off of not being visually aligned vertically.

Despite this downside I feel it still likely represents one of the cleanest fixes possible to the problem as it doesn't affect HTML structure and will remain unaffected by other upstream changes in how rendering for these lists works. Additionally, it avoids any fragile JavaScript calculations trying to determine how much leading padding is required for a given list of numbers given complex structures such as this valid HTML where it isn't always going to be programatically obvious what the largest marker number value will be:

<ol>
    <li>new style</li>
    <li>new style</li>
    <li>new style</li>
    <li>new style</li>
    <li value="500">new style</li>
    <li value="6">new style</li>
    <li>new style</li>
    <li>new style</li>
    <li>new style</li>
    <li>new style</li>
</ol>

@americanrefugee americanrefugee left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with the proposed change. It's actually what I would expect when writing in markdown.

@amshakal amshakal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me. Thanks for your contribution!

@t3chguy

t3chguy commented Jan 5, 2026

Copy link
Copy Markdown
Member

Thanks both

@t3chguy t3chguy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@t3chguy
t3chguy added this pull request to the merge queue Jan 5, 2026
Merged via the queue into element-hq:develop with commit 5e6ee49 Jan 5, 2026
44 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Defect Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client cuts numbers at the beginning of a sentence

5 participants