Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-04-15 19:27:15 +0300
committerGitHub <noreply@github.com>2020-04-15 19:27:15 +0300
commite8aeaf26ddc48d981e15d739a666a5de1705916b (patch)
tree507aa411965e01c0e4c61f4b0760540baece9e93 /sphinx/themes/basic/static/basic.css_t
parentaf8ff9e7217cc95f8d66ff8ef0fc8ddf59596c69 (diff)
parentc795793d41d7ae0d13f2ab4ab5acf95f0e6551ec (diff)
Merge pull request #7482 from mgeier/basic-code-blocks
basic theme: CSS spacing for code blocks with captions and line numbers
Diffstat (limited to 'sphinx/themes/basic/static/basic.css_t')
-rw-r--r--sphinx/themes/basic/static/basic.css_t44
1 files changed, 36 insertions, 8 deletions
diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t
index 4b15fce70..ca3c17b89 100644
--- a/sphinx/themes/basic/static/basic.css_t
+++ b/sphinx/themes/basic/static/basic.css_t
@@ -646,21 +646,52 @@ span.pre {
}
td.linenos pre {
- padding: 5px 0px;
border: 0;
background-color: transparent;
color: #aaa;
}
table.highlighttable {
- margin-left: 0.5em;
+ display: block;
+ margin: 1em 0;
+}
+
+table.highlighttable tbody {
+ display: block;
+}
+
+table.highlighttable tr {
+ display: flex;
}
table.highlighttable td {
- padding: 0 0.5em 0 0.5em;
+ margin: 0;
+ padding: 0;
+}
+
+table.highlighttable td.linenos {
+ padding: 0 0.5em;
+}
+
+table.highlighttable td.code {
+ flex: 1;
+ overflow: hidden;
+}
+
+.highlight .hll {
+ display: block;
+}
+
+table.highlighttable pre {
+ margin: 0;
+}
+
+div.code-block-caption + div > table.highlighttable {
+ margin-top: 0;
}
div.code-block-caption {
+ margin-top: 1em;
padding: 2px 5px;
font-size: small;
}
@@ -673,6 +704,7 @@ div.code-block-caption + div > div.highlight > pre {
margin-top: 0;
}
+table.highlighttable td.linenos,
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
}
@@ -686,11 +718,7 @@ div.code-block-caption span.caption-text {
}
div.literal-block-wrapper {
- padding: 1em 1em 0;
-}
-
-div.literal-block-wrapper div.highlight {
- margin: 0;
+ margin: 1em 0;
}
code.descname {