Markdown Preview clips the left edge of ordered-list numbers once they reach two digits (10, 11, 12, …). Single-digit markers render fully. Commenting out the list padding-left rule in DevTools makes every marker visible again.
Environment
- Cursor 3.24.12 stable
- Commit
37b865941ccb31e2fc90c685157534efca87f960 - Date 2026-10-09
- VS Code 1.128.0
- Linux
- Built-in Markdown editor, Preview mode (ProseMirror), not the raw Markdown source view
Steps
- Open a
.mdfile that contains an ordered list continuing past 9. - Switch to Preview.
- Compare items 8–9 with items 10 and above.
Example:
8. Eighth item
9. Ninth item
10. Tenth item
11. Eleventh item
12. Twelfth item
Actual
The leftmost stroke of 10., 11., 12., … is cut off. In a screenshot, 8. and 10. share the same right edge, and 10. extends further left than 8.. That extra width is clipped.
Expected
The full marker, including the tens digit and the period, is visible and lines up with the single-digit markers.
Workaround that confirms the rule
In DevTools, disable:
.ui-1hm90jn.ui-1hm90jn .ProseMirror :is(ul, ol):where(:not([data-rte-prose-boundary] *)) {
padding-left: var(--rte-list-padding-left);
}
The list then falls back to the user-agent padding (about 40px) and the numbers render completely. The generated class ui-1hm90jn will differ between builds. The stable part is the custom property.
Cause
Preview uses the page rich-text theme. That theme sets:
--rte-list-padding-left: 0--rte-ol-marker-column: 20px--rte-ol-marker-content: counter(rte-list-item) "."--rte-list-item-display: block--rte-list-item-position: relative--rte-font-size-base: 14px
Markers are not native ::markers. Each item draws one with:
.ProseMirror li:not([data-type='taskItem'])::before {
content: var(--rte-list-marker-content);
position: absolute;
left: 0;
top: 0;
width: var(--rte-list-marker-column);
}
.ProseMirror li:not([data-type='taskItem']) {
padding-left: var(--rte-list-marker-column);
}
.ProseMirror ol {
--rte-list-marker-column: var(--rte-ol-marker-column);
--rte-list-marker-font-variant-numeric: tabular-nums;
}
20px is enough for one digit plus a period at 14px. 10. is wider. Because the list padding is 0, the overflow has nowhere to go and the left edge is clipped. The same rule is in both workbench.desktop.main.js and workbench.glass.main.js.
The other theme still uses native markers (--rte-ol-marker-content: none, --rte-ol-marker-column: 0, --rte-list-padding-left: 1.5em). This report is about the page/Preview theme.
Suggested fix
Give the ordered-list marker column enough width for at least two digits and a period, and do not set ol padding to 0 in the page theme. For example, about 2.5em to 40px for --rte-ol-marker-column, with ol padding at least that wide so a hanging digit cannot be clipped. ul can keep the current 0 padding. A list that can reach three digits needs a wider column than two digits.
Sizing only the ::before is not enough if padding-left on ol stays 0: the extra glyph still sticks out of the list box and gets clipped.