From 59fedc0791b055dc52949e8efa97dfbe7d660118 Mon Sep 17 00:00:00 2001 From: shimizukawa Date: Mon, 23 Feb 2015 00:38:09 +0900 Subject: [PATCH] Closes #1630: resolve CSS conflicts, ``div.container`` css target for literal block wrapper now renamed to ``div.literal-block-wrapper``. --- CHANGES | 2 ++ sphinx/directives/code.py | 3 ++- sphinx/themes/agogo/static/agogo.css_t | 4 ++-- sphinx/themes/basic/static/basic.css_t | 4 ++-- sphinx/themes/bizstyle/static/bizstyle.css_t | 2 +- sphinx/themes/epub/static/epub.css | 4 ++-- sphinx/themes/scrolls/static/scrolls.css_t | 4 ++-- sphinx/themes/traditional/static/traditional.css_t | 4 ++-- 8 files changed, 15 insertions(+), 12 deletions(-) diff --git a/CHANGES b/CHANGES index a55d03776..53eda4c02 100644 --- a/CHANGES +++ b/CHANGES @@ -52,6 +52,8 @@ Bugs fixed * #1722: restore ``toctree()`` template function behavior that was changed at 1.3b1. * #1732: i18n: localized table caption raises exception. * #1718: ``:numref:`` does not work with capital letters in the label +* #1630: resolve CSS conflicts, ``div.container`` css target for literal block wrapper + now renamed to ``div.literal-block-wrapper``. Release 1.3b2 (released Dec 5, 2014) diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py index 204adbfb7..ea28ff1ed 100644 --- a/sphinx/directives/code.py +++ b/sphinx/directives/code.py @@ -63,7 +63,8 @@ def dedent_lines(lines, dedent): def container_wrapper(directive, literal_node, caption): - container_node = nodes.container('', literal_block=True) + container_node = nodes.container('', literal_block=True, + classes=['literal-block-wrapper']) parsed = nodes.Element() directive.state.nested_parse(ViewList([caption], source=''), directive.content_offset, parsed) diff --git a/sphinx/themes/agogo/static/agogo.css_t b/sphinx/themes/agogo/static/agogo.css_t index 04f377d7b..87801d685 100644 --- a/sphinx/themes/agogo/static/agogo.css_t +++ b/sphinx/themes/agogo/static/agogo.css_t @@ -210,12 +210,12 @@ div.document div.highlight { margin-bottom: .8em; } -div.document div.container { +div.document div.literal-block-wrapper { margin-top: .8em; margin-bottom: .8em; } -div.document div.container div.highlight { +div.document div.literal-block-wrapper div.highlight { margin: 0; } diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t index bf000dce0..d2afc4a3d 100644 --- a/sphinx/themes/basic/static/basic.css_t +++ b/sphinx/themes/basic/static/basic.css_t @@ -525,11 +525,11 @@ div.code-block-caption span.caption-number { div.code-block-caption span.caption-text { } -div.container { +div.literal-block-wrapper { padding: 1em 1em 0; } -div.container div.highlight { +div.literal-block-wrapper div.highlight { margin: 0; } diff --git a/sphinx/themes/bizstyle/static/bizstyle.css_t b/sphinx/themes/bizstyle/static/bizstyle.css_t index 0577ec101..949d86c6a 100644 --- a/sphinx/themes/bizstyle/static/bizstyle.css_t +++ b/sphinx/themes/bizstyle/static/bizstyle.css_t @@ -448,7 +448,7 @@ th { background-color: #82A0BE; } -div.container div.code-block-caption { +div.literal-block-wrapper div.code-block-caption { background-color: #EEE; border-style: solid; border-color: #CCC; diff --git a/sphinx/themes/epub/static/epub.css b/sphinx/themes/epub/static/epub.css index 847b3511f..d4cc62afa 100644 --- a/sphinx/themes/epub/static/epub.css +++ b/sphinx/themes/epub/static/epub.css @@ -461,11 +461,11 @@ div.code-block-caption span.caption-number { div.code-block-caption span.caption-text { } -div.container { +div.literal-block-wrapper { padding: 1em 1em 0; } -div.container div.highlight { +div.literal-block-wrapper div.highlight { margin: 0; } diff --git a/sphinx/themes/scrolls/static/scrolls.css_t b/sphinx/themes/scrolls/static/scrolls.css_t index 63d79e1d3..a6833cf7b 100644 --- a/sphinx/themes/scrolls/static/scrolls.css_t +++ b/sphinx/themes/scrolls/static/scrolls.css_t @@ -217,11 +217,11 @@ div.code-block-caption span.caption-number { div.code-block-caption span.caption-text { } -div.container { +div.literal-block-wrapper { padding: 1em 1em 0; } -div.container pre { +div.literal-block-wrapper pre { margin: 0; } diff --git a/sphinx/themes/traditional/static/traditional.css_t b/sphinx/themes/traditional/static/traditional.css_t index e684898d2..ba96ca6e8 100644 --- a/sphinx/themes/traditional/static/traditional.css_t +++ b/sphinx/themes/traditional/static/traditional.css_t @@ -722,11 +722,11 @@ div.code-block-caption span.caption-number { div.code-block-caption span.caption-text { } -div.container { +div.literal-block-wrapper { padding: 1em 1em 0; } -div.container pre { +div.literal-block-wrapper pre { margin: 0; }