From 12e65061f57e78fdfecead0d36b51107ddccd495 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 9 Feb 2019 17:49:24 +0900 Subject: [PATCH] Update basic.css for HTML5 writer --- doc/_themes/sphinx13/static/sphinx13.css | 21 ++++---- sphinx/themes/basic/static/basic.css_t | 66 +++++++++++++++++++++++- 2 files changed, 74 insertions(+), 13 deletions(-) diff --git a/doc/_themes/sphinx13/static/sphinx13.css b/doc/_themes/sphinx13/static/sphinx13.css index 235bfdcc4..3dadf8168 100644 --- a/doc/_themes/sphinx13/static/sphinx13.css +++ b/doc/_themes/sphinx13/static/sphinx13.css @@ -388,32 +388,29 @@ div.admonition, div.warning { padding: 0; } -div.admonition p, div.warning p { +div.admonition > p, div.warning > p { margin: 0.5em 1em 0.5em 1em; padding: 0; } -div.admonition pre, div.warning pre { +div.admonition > pre, div.warning > pre { margin: 0.4em 1em 0.4em 1em; } -div.admonition p.admonition-title, -div.warning p.admonition-title { - margin-top: 1em; - padding-top: 0.5em; +div.admonition > p.admonition-title, +div.warning > p.admonition-title { + margin-top: 0.5em; font-weight: bold; } div.warning { border: 1px solid #940000; -/* background-color: #FFCCCF;*/ } -div.warning p.admonition-title { -} - -div.admonition ul, div.admonition ol, -div.warning ul, div.warning ol { +div.admonition > ul, +div.admonition > ol, +div.warning > ul, +div.warning > ol { margin: 0.1em 0.5em 0.5em 3em; padding: 0; } diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t index 5bdd803eb..ec30e8432 100644 --- a/sphinx/themes/basic/static/basic.css_t +++ b/sphinx/themes/basic/static/basic.css_t @@ -231,6 +231,16 @@ a.headerlink { visibility: hidden; } +a.brackets:before, +span.brackets > a:before{ + content: "["; +} + +a.brackets:after, +span.brackets > a:after { + content: "]"; +} + h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, @@ -391,6 +401,14 @@ table.citation td { border-bottom: none; } +td > p:first-child { + margin-top: 0px; +} + +td > p:only-child { + margin-bottom: 0px; +} + /* -- figures --------------------------------------------------------------- */ div.figure { @@ -460,11 +478,57 @@ ol.upperroman { list-style: upper-roman; } +li > p:first-child { + margin-top: 0px; +} + +li > p:only-child { + margin-bottom: 0px; +} + +dl.footnote > dt, +dl.citation > dt { + float: left; +} + +dl.footnote > dd, +dl.citation > dd { + margin-bottom: 0em; +} + +dl.footnote > dd:after, +dl.citation > dd:after { + content: ""; + clear: both; +} + +dl.field-list { + display: flex; + flex-wrap: wrap; +} + +dl.field-list > dt { + flex-basis: 20%; + font-weight: bold; + word-break: break-word; +} + +dl.field-list > dt:after { + content: ":"; +} + +dl.field-list > dd { + flex-basis: 70%; + padding-left: 1em; + margin-left: 0em; + margin-bottom: 0em; +} + dl { margin-bottom: 15px; } -dd p { +dd > p:first-child { margin-top: 0px; }