Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mzebrak opened this issue May 5, 2025 · 0 comments
Assignees
Labels
unconfirmed This bug was not reproduced yet

Comments

@mzebrak
Copy link

mzebrak commented May 5, 2025

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

@mzebrak mzebrak added the unconfirmed This bug was not reproduced yet label May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unconfirmed This bug was not reproduced yet
Projects
None yet
Development

No branches or pull requests

2 participants