Skip to content

Commit baed912

Browse files
matyasfclaude
andcommitted
fix(ui-list): align ordered list start position with unordered lists
The previous implementation divided listPadding by 2, but this did not correctly align ordered and unordered lists. Changed to subtract a fixed 1.3rem offset from the listPadding to ensure both list types start at the same vertical position. To test: Compare ordered and unordered lists side-by-side as shown in the steps to reproduce example. Both list types should now start at the same horizontal position. Fixes #2249 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 765acf4 commit baed912

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/ui-list/src/List/styles.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ const generateStyle = (
5151

5252
...(ordered && {
5353
listStyleType: 'none',
54-
paddingInlineStart: `calc(${componentTheme.listPadding} / 2)`,
54+
// 1.3 rem is removed to have the ordered list start at the same point
55+
// as the unordered vertically
56+
paddingInlineStart: `calc(${componentTheme.listPadding} - 1.3rem)`,
5557
paddingInlineEnd: 0,
5658
counterReset: 'ol-counter',
5759

0 commit comments

Comments
 (0)