Skip to content

🐛 Hide the native list marker on steps with sphinx-rtd-theme - #321

Open
kartben wants to merge 1 commit into
executablebooks:mainfrom
kartben:fix-steps-rtd-list-style
Open

kartben wants to merge 1 commit into
executablebooks:mainfrom
kartben:fix-steps-rtd-list-style

Conversation

@kartben

@kartben kartben commented Nov 19, 2026 •

Copy link
Copy Markdown

Fixes #320.

Hiding the native marker on the <ol> is not enough when a theme styles the list items themselves. sphinx-rtd-theme, for example, sets list-style: decimal; margin-left: 24px on ol li, so the native number shows beside each step marker and the steps are indented.

This resets both on .sd-step with doubled classes, as steps.css already does for the <ol>, and adds a test that the item rule outranks such a theme selector.

Hiding the marker on the `<ol>` is not enough when a theme styles the list
items themselves: sphinx-rtd-theme sets `list-style: decimal` and a left
margin on `ol li`, so the native number showed beside the step marker and
the steps were indented. Reset both on `.sd-step` with doubled classes, as
already done for the `<ol>`.
@kartben
kartben force-pushed the fix-steps-rtd-list-style branch from 85591b0 to e98e3e8 Compare November 19, 2026 17:59
@kartben
kartben marked this pull request as ready for review November 19, 2026 18:51

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

steps: native list number shows next to the step marker with sphinx-rtd-theme

1 participant