From 1896f22cad1120f4a891f760a42dabdfb619c319 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Wed, 4 May 2022 13:33:14 +0200 Subject: [PATCH] indent docstrings on desktop screens --- CHANGELOG.md | 1 + pdoc/templates/content.css | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6e27c29..247924ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) diff --git a/pdoc/templates/content.css b/pdoc/templates/content.css index 1b5cc5b9..9102adaa 100644 --- a/pdoc/templates/content.css +++ b/pdoc/templates/content.css @@ -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;