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
CSS classes for just attribute/class/method/function name part of signature #240
Comments
Maybe we could use spans. Note that you can also override the |
Couldn't you simply select the first span then? .doc.doc-heading span:first-child {
font-weight: bold;
} |
It's been a while and I don't recall the details exactly, but I remember reading this StackOverflow answer about how |
Spans are only used when signatures are separated. Issue mkdocstrings/mkdocstrings#240: mkdocstrings/mkdocstrings#240
The new Python handler now adds these CSS classes to spans containing objects names in headings:
...KIND being attribute, function, class or module. Closing, feel free to reopen 🙂 |
Is your feature request related to a problem? Please describe.
There is currently not a straightforward way to specify CSS selectors to just grab attribute/class/method/function names for styling. For example, I decided to style my docs' headers such that the names are bolded but not the rest of the signature like the type hints and arguments.
Describe the solution you'd like
CSS classes for the names of attribute/class/method/function signatures
Describe alternatives you've considered
Currently, I'm using a work around by first selecting all span elements inside
doc-heading
and styling them and then selecting all spans except the first and unstyling them. This is approach is obtuse and feels fragile—I'd much rather achieve this declaratively.Example:
The text was updated successfully, but these errors were encountered: