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

Closed
mzebrak opened this issue May 5, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

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
@pawamoy
Copy link
Member

pawamoy commented May 20, 2025

Tracked in #276, but I'll keep this one open too for visibility 🙂 Thanks for the report @mzebrak!

pawamoy added a commit that referenced this issue May 20, 2025
@pawamoy pawamoy closed this as completed May 20, 2025
@pawamoy pawamoy added bug Something isn't working and removed unconfirmed This bug was not reproduced yet labels May 20, 2025
Gandalf-the-Grey pushed a commit to openhive-network/wax that referenced this issue May 27, 2025
Gandalf-the-Grey pushed a commit to openhive-network/wax that referenced this issue May 27, 2025
Gandalf-the-Grey pushed a commit to openhive-network/wax that referenced this issue Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants