Skip to content

Commit 3434208

Browse files
Style codeblock :caption: (#288)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent acc6133 commit 3434208

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

python_docs_theme/static/pydoctheme.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,25 @@ div.body {
247247
}
248248
}
249249

250+
div.code-block-caption {
251+
background-color: #eee;
252+
border: 1px solid #ac9;
253+
border-bottom: none;
254+
border-radius: 3px 3px 0 0;
255+
padding: 0.3em 0.6em;
256+
font-size: 90%;
257+
color: #333;
258+
259+
& + div pre {
260+
border-top-left-radius: 0 !important;
261+
border-top-right-radius: 0 !important;
262+
}
263+
264+
& + div .copybutton {
265+
border-top-right-radius: 0 !important;
266+
}
267+
}
268+
250269
/* Admonitions */
251270
:root {
252271
--admonition-background: #eee;

python_docs_theme/static/pydoctheme_dark.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ div.body pre {
9797
border-color: #616161;
9898
}
9999

100+
div.code-block-caption {
101+
background-color: #333;
102+
border-color: #616161;
103+
color: white;
104+
}
105+
100106
code {
101107
background-color: #424242;
102108
}

0 commit comments

Comments
 (0)