Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for docutils 0.17 #1185

Merged
merged 8 commits into from Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -119,7 +119,7 @@ def run(self):
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
install_requires=[
'sphinx>=1.6',
'docutils<0.17', # https://github.com/sphinx-doc/sphinx/issues/9001
'docutils<0.18',
],
tests_require=[
'pytest',
Expand Down
4 changes: 2 additions & 2 deletions sphinx_rtd_theme/static/css/theme.css

Large diffs are not rendered by default.

79 changes: 43 additions & 36 deletions src/sass/_theme_rst.sass
Expand Up @@ -14,24 +14,28 @@
// --------------------------------------------------------------------------------------------------------------------

.rst-content
// Some browsers like to give arbituary margins :( make them all consistent.
h1, h2, h3, h4, h5, h6
margin-bottom: $base-line-height

// Sphinx by default applies HxW style attributes to images. This fixes that oversite.
img
max-width: 100%
height: auto

div.figure
div.figure, figure
margin-bottom: $base-line-height
p.caption
.caption-text
font-style: italic
p:last-child.caption
margin-bottom: 0px

div.figure.align-center
text-align: center
&.align-center
text-align: center

// Usually it's a good idea to give images some space.
.section > img, .section > a > img
margin-bottom: $base-line-height
.section, section >
img, a > img
margin-bottom: $base-line-height

// normalize browser styling
abbr[title]
Expand Down Expand Up @@ -147,36 +151,39 @@
td, th
background: transparent !important
border-color: rgba(0, 0, 0, 0.1) !important
.section ul, .toctree-wrapper ul
@extend .wy-plain-list-disc
.section ol.loweralpha, .section ol.loweralpha > li
list-style: lower-alpha
.section ol.upperalpha, .section ol.upperalpha > li
list-style: upper-alpha
.section ol, ol.arabic
@extend .wy-plain-list-decimal
// Complex bullet lists, they have more item margins than simple lists
.section ol li, .section ul li
> *
margin-top: $base-line-height / 2
margin-bottom: $base-line-height / 2
&:first-child
margin-top: 0rem
> p
&, &:last-child

.section, section
ul, .toctree-wrapper ul
@extend .wy-plain-list-disc
ol.loweralpha, ol.loweralpha > li
list-style: lower-alpha
ol.upperalpha, ol.upperalpha > li
list-style: upper-alpha
ol, ol.arabic
@extend .wy-plain-list-decimal
// Complex bullet lists, they have more item margins than simple lists
ol li, ul li
> *
margin-top: $base-line-height / 2
margin-bottom: $base-line-height / 2
&:first-child
margin-top: 0rem
> p
&, &:last-child
margin-bottom: $base-line-height / 2
&:only-child, &:only-child:last-child
margin-bottom: 0rem
> ul, > ol
margin-bottom: $base-line-height / 2
&:only-child, &:only-child:last-child
// Simple lists, no item margins
ol.simple li, ul.simple li
> *
margin-top: 0rem
margin-bottom: 0rem
> ul, > ol
margin-bottom: $base-line-height / 2
// Simple lists, no item margins
.section ol.simple li, .section ul.simple li
> *
margin-top: 0rem
margin-bottom: 0rem
ul, ol
margin-top: 0rem
margin-bottom: 0rem
ul, ol
margin-top: 0rem
margin-bottom: 0rem

.line-block
margin-left: 0px
margin-bottom: $base-line-height
Expand Down Expand Up @@ -206,7 +213,7 @@
@extend h2

// This is the #href that shows up on hover. Sphinx's is terrible so I hack it away.
h1, h2, h3, h4, h5, h6, dl dt, p.caption, table > caption, .code-block-caption, .eqno
h1, h2, h3, h4, h5, h6, dl dt, p, p.caption, table > caption, .code-block-caption, .eqno
.headerlink
opacity: 0
font-size: 14px
Expand Down