Skip to content

Commit

Permalink
CSS: support for nav.contents (docutils 0.18)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Jun 7, 2022
1 parent 1c9aa64 commit 6b2d522
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/insipid_sphinx_theme/insipid/static/insipid.css_t
Expand Up @@ -359,16 +359,21 @@ table.autosummary span.pre {
/* -- admonitions ----------------------------------------------------------- */

div.topic, aside.topic,
div.sidebar, aside.sidebar {
div.sidebar, aside.sidebar,
nav.contents {
border: none;
padding: 7px;
}

.section > div.admonition,
section > div.admonition,
div.body > div.admonition,
.section > .topic,
section > .topic,
div.body > .topic {
div.body > .topic,
.section > nav.contents,
section > nav.contents,
div.body > nav.contents {
margin: 10px -7px;
}

Expand All @@ -379,6 +384,7 @@ aside.sidebar {

div.admonition > p.admonition-title,
.topic > p.topic-title,
nav.contents > p.topic-title,
.sidebar > p.sidebar-title {
margin: -7px -7px 7px -7px;
padding: 4px 7px;
Expand All @@ -396,16 +402,22 @@ div.admonition > p.admonition-title,

div.admonition > p.admonition-title + *,
.topic > p.topic-title + *,
nav.contents > p.topic-title + *,
.sidebar > p.sidebar-title + * {
margin-top: 0;
}

div.admonition > :first-child:not(.admonition-title),
div.topic > :first-child:not(.topic-title),
aside.topic > :first-child:not(.topic-title) {
aside.topic > :first-child:not(.topic-title),
nav.contents > :first-child:not(.topic-title) {
margin-top: 0;
}

nav.contents > :last-child {
margin-bottom: 0;
}

div.admonition {
background-color: #e4ebf2;
}
Expand All @@ -430,11 +442,12 @@ div.admonition.warning > p.admonition-title {
background-color: #f0d5b8;
}

div.topic, aside.topic {
div.topic, nav.contents, aside.topic {
background-color: #fff0eb;
}

.topic > p.topic-title {
.topic > p.topic-title,
nav.contents > p.topic-title {
background-color: #f0dbd4;
}

Expand Down

0 comments on commit 6b2d522

Please sign in to comment.