readthedocs / sphinx_rtd_theme

Sphinx theme from Read the Docs
https://sphinx-rtd-theme.readthedocs.io/
MIT License
4.76k stars 1.73k forks source link

Styling of type for instance property looks different compared to styling of type for return values #980

Open CarstenLeue opened 4 years ago

CarstenLeue commented 4 years ago

Problem

This is a spin-off of defect https://github.com/sphinx-doc/sphinx/issues/7972

The styling of types for properties looks different than for types of return values:

https://github.com/Carsten-Leue/sphinx-autodoc/blob/master/build/docs/sphinx_autodoc.html#L189

The property type uses class='property', the return value class='pre'

Reproducible Project

https://github.com/Carsten-Leue/sphinx-autodoc/

Expected Results

I'd expect type documentation to look consistent across the project.

Environment Info

OS: Windoes 10 Python version: Python 3.8.4 (tags/v3.8.4:dfa645a, Jul 13 2020, 16:46:45) [MSC v.1924 64 bit (AMD64)] on win32 Sphinx version: 3.1.2 Sphinx extensions: ['sphinx.ext.intersphinx', 'sphinx.ext.napoleon', 'sphinx_autodoc_typehints', 'sphinx.ext.autodoc']

Blendify commented 3 years ago

Can you add an image of the issue?