Skip to content

List bullets are not rendered in documentation due to CSS RTD theme overrides #467

@vsnever

Description

@vsnever

When building documentation with: docutils==0.20.1, Sphinx==7.4.7 and sphinx-rtd-theme==2.0.0, the list bullets are not rendered:

  1. Screenshot 2024-09-05 at 16 30 44
  2. Screenshot 2024-09-05 at 16 32 19

The reason is that the default CSS styles are overridden in in the docs/source/cons.py:

core/docs/source/conf.py

Lines 144 to 148 in 26595cb

html_context = {'css_files': [
'_static/theme_overrides.css', # override wide tables in RTD theme
'_static/tabs.css',
]
}

Removing list-style:none for ul, ol, dl and li tags:

ul,ol,dl{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}

in docs/source/static/theme_overrides.css returns the bullet rendering to normal, but the zero margins defined in several places in that file result in weird formatting of the HTML documentation.

I was trying to tweak other parameters in docs/source/static/theme_overrides.css, but in my opinion the best output is obtained using the default RTD theme CSS styles. Shouldn't we just comment out the html_context override in docs/source/cons.py?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions