Skip to content

Commit

Permalink
indent docstrings on desktop screens
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils committed May 4, 2022
1 parent b0f69e1 commit 1896f22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
for example when using PyO3.
([#390](https://github.com/mitmproxy/pdoc/issues/390), [@mhils](https://github.com/mhils))
- Template Style Improvements: The size of headings within docstrings has been reduced.
Docstrings are now slightly indented on wide screens.
([#383](https://github.com/mitmproxy/pdoc/issues/383), [@jacksund](https://github.com/jacksund) and [@mhils](https://github.com/mhils))
- Improve rendering of `typing.TypedDict` subclasses.
([#389](https://github.com/mitmproxy/pdoc/issues/389), [@mhils](https://github.com/mhils))
Expand Down
4 changes: 4 additions & 0 deletions pdoc/templates/content.css
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ This makes sure that the pdoc styling doesn't leak to the rest of the page when
margin-bottom: 1.5rem;
}

.pdoc section:not(.module-info) .docstring {
margin-left: clamp(0rem, 5vw - 2rem, 1rem);
}

.pdoc .docstring .pdoc-code {
margin-left: 1em;
margin-right: 1em;
Expand Down

0 comments on commit 1896f22

Please # to comment.