Skip to content

Commit

Permalink
Merge pull request #10535 from AA-Turner/css-nav-contents
Browse files Browse the repository at this point in the history
Fix `nav.contents` CSS for Docutils 0.18
  • Loading branch information
tk0miya authored Jun 14, 2022
2 parents 7096024 + 27f0532 commit 377d866
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 13 deletions.
1 change: 1 addition & 0 deletions doc/_themes/sphinx13/static/sphinx13.css
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ div.quotebar {
margin-left: 1em;
}

nav.contents,
div.topic,
aside.topic {
background-color: #f8f8f8;
Expand Down
22 changes: 18 additions & 4 deletions sphinx/themes/basic/static/basic.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,21 @@ p.sidebar-title {
font-weight: bold;
}

div.admonition, div.topic, aside.topic, blockquote {
{%- if docutils_version_info[:2] >= (0, 18) %}
nav.contents,
aside.topic,
{% endif %}
div.admonition, div.topic, blockquote {
clear: left;
}

/* -- topics ---------------------------------------------------------------- */

div.topic, aside.topic {
{%- if docutils_version_info[:2] >= (0, 18) %}
nav.contents,
aside.topic,
{% endif %}
div.topic {
border: 1px solid #ccc;
padding: 7px;
margin: 10px 0 10px 0;
Expand Down Expand Up @@ -381,16 +389,22 @@ div.body p.centered {

div.sidebar > :last-child,
aside.sidebar > :last-child,
div.topic > :last-child,
{%- if docutils_version_info[:2] >= (0, 18) %}
nav.contents > :last-child,
aside.topic > :last-child,
{% endif %}
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}

div.sidebar::after,
aside.sidebar::after,
div.topic::after,
{%- if docutils_version_info[:2] >= (0, 18) %}
nav.contents::after,
aside.topic::after,
{% endif %}
div.topic::after,
div.admonition::after,
blockquote::after {
display: block;
Expand Down
6 changes: 5 additions & 1 deletion sphinx/themes/bizstyle/static/bizstyle.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,11 @@ div.quotebar {
border: 1px solid #ccc;
}

div.topic, aside.topic {
{%- if docutils_version_info[:2] >= (0, 18) %}
nav.contents,
aside.topic,
{% endif %}
div.topic {
background-color: #f8f8f8;
}

Expand Down
6 changes: 5 additions & 1 deletion sphinx/themes/classic/static/classic.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,11 @@ div.seealso {
border: 1px solid #ff6;
}

div.topic, aside.topic {
{%- if docutils_version_info[:2] >= (0, 18) %}
nav.contents,
aside.topic,
{% endif %}
div.topic {
background-color: #eee;
}

Expand Down
6 changes: 5 additions & 1 deletion sphinx/themes/epub/static/epub.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,11 @@ p.sidebar-title {

/* -- topics ---------------------------------------------------------------- */

div.topic, aside.topic {
{%- if docutils_version_info[:2] >= (0, 18) %}
nav.contents,
aside.topic,
{% endif %}
div.topic {
border: 1px solid #ccc;
padding: 7px 7px 0 7px;
margin: 10px 0 10px 0;
Expand Down
6 changes: 5 additions & 1 deletion sphinx/themes/nature/static/nature.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ div.seealso {
border: 1px solid #ff6;
}

div.topic, aside.topic {
{%- if docutils_version_info[:2] >= (0, 18) %}
nav.contents,
aside.topic,
{% endif %}
div.topic {
background-color: #eee;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,11 @@ p.sidebar-title {

/* -- topics ---------------------------------------------------------------- */

div.topic, aside.topic {
{%- if docutils_version_info[:2] >= (0, 18) %}
nav.contents,
aside.topic,
{% endif %}
div.topic {
border: 1px solid #ccc;
padding: 7px 7px 0 7px;
margin: 10px 0 10px 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ div.seealso {
border: 1px solid #ff6;
}

div.topic, aside.topic {
{%- if docutils_version_info[:2] >= (0, 18) %}
nav.contents,
aside.topic,
{% endif %}
div.topic {
background-color: #eee;
}

Expand Down
6 changes: 5 additions & 1 deletion sphinx/themes/pyramid/static/pyramid.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,11 @@ div.seealso {
padding: 10px 20px 10px 60px;
}

div.topic, aside.topic {
{%- if docutils_version_info[:2] >= (0, 18) %}
nav.contents,
aside.topic,
{% endif %}
div.topic {
background: #eeeeee;
border: 2px solid #C6C9CB;
padding: 10px 20px;
Expand Down
6 changes: 5 additions & 1 deletion sphinx/themes/sphinxdoc/static/sphinxdoc.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,11 @@ div.quotebar {
border: 1px solid #ccc;
}

div.topic, aside.topic {
{%- if docutils_version_info[:2] >= (0, 18) %}
nav.contents,
aside.topic,
{% endif %}
div.topic {
background-color: #f8f8f8;
}

Expand Down
6 changes: 5 additions & 1 deletion sphinx/themes/traditional/static/traditional.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,11 @@ p.rubric {

/* "Topics" */

div.topic, aside.topic {
{%- if docutils_version_info[:2] >= (0, 18) %}
nav.contents,
aside.topic,
{% endif %}
div.topic {
background-color: #eee;
border: 1px solid #ccc;
padding: 0 7px 0 7px;
Expand Down

0 comments on commit 377d866

Please sign in to comment.