From dd2fcf70b8ed4570bab08d106372fdd3d1e67ec8 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sun, 14 Dec 2025 10:13:04 +0000 Subject: [PATCH] Style codeblock caption --- python_docs_theme/static/pydoctheme.css | 15 +++++++++++++++ python_docs_theme/static/pydoctheme_dark.css | 6 ++++++ 2 files changed, 21 insertions(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index ec2d285..de11cbd 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -247,6 +247,21 @@ div.body { } } +div.code-block-caption { + background-color: #eee; + border: 1px solid #ac9; + border-bottom: none; + border-radius: 3px 3px 0 0; + padding: 0.3em 0.6em; + font-size: 90%; + color: #333; +} + +div.literal-block-wrapper pre { + border-top-left-radius: 0 !important; + border-top-right-radius: 0 !important; +} + /* Admonitions */ :root { --admonition-background: #eee; diff --git a/python_docs_theme/static/pydoctheme_dark.css b/python_docs_theme/static/pydoctheme_dark.css index 582e4dd..909a296 100644 --- a/python_docs_theme/static/pydoctheme_dark.css +++ b/python_docs_theme/static/pydoctheme_dark.css @@ -97,6 +97,12 @@ div.body pre { border-color: #616161; } +div.code-block-caption { + background-color: #333; + border-color: #616161; + color: white; +} + code { background-color: #424242; }