Skip to content

bug: class and function names inside h5 are uppercase / missing .code class for names? #276

Closed
@mzebrak

Description

@mzebrak

Description of the bug

It is similar/related to squidfunk/mkdocs-material#7734 which resulted in this fix

The issue is that the text inside h5 headers (class names, function names) is converted to uppercase.

Since there is a fix already in the mkdocs-material itself, which disables this uppercase formatting inside h5.code CSS class, maybe all the class/function names should have the .code class?

Image

To Reproduce

Enable the show_submodules option and have a nested submodules structure, so h5 header will be created for class/function.

Like :

  1. Declare in mkdocs.yml
plugins:
  - mkdocstrings:
      default_handler: python
      handlers:
        python:
          options:
            show_submodules: true
  1. Define a class like mypackage.exceptions.account_errors.AccountNotFoundError

Expected behavior

The class names (and function names) will be the same as in the python code. (so AccountNotFoundError and not ACCOUNTNOTFOUNDERROR)

Environment information

  • cpython 3.12.3
  • mkdocs 1.6.1
  • mkdocstrings-python 1.16.10
  • mkdocs-material 9.6.12

Additional context

I think it is related to: squidfunk/mkdocs-material#1522 and squidfunk/mkdocs-material#7734, which resulted in this fix

The workaround seems to be:

h5 .doc-object-name {
  text-transform: none;
}

defined in the extra.css

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions