Skip to content

Commit 34f81da

Browse files
committed
Add support for docutils 0.17
This should'nt be a breaking change as backward compatibility is preserved so this change could go into 1.0 or wait until 1.1. I know a lot of users are asking for this so it might be nice to include this in 1.0. Fixes #1115
1 parent 9a50ff9 commit 34f81da

File tree

3 files changed

+37
-38
lines changed

3 files changed

+37
-38
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def run(self):
119119
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
120120
install_requires=[
121121
'sphinx>=1.6',
122-
'docutils<0.17', # https://github.com/sphinx-doc/sphinx/issues/9001
122+
'docutils<=0.17.1',
123123
],
124124
tests_require=[
125125
'pytest',

sphinx_rtd_theme/static/css/theme.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/sass/_theme_rst.sass

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,18 @@
1616
.rst-content
1717
// Sphinx by default applies HxW style attributes to images. This fixes that oversite.
1818
img
19+
margin-bottom: $base-line-height
1920
max-width: 100%
2021
height: auto
2122

22-
div.figure
23+
div.figure, figure
2324
margin-bottom: $base-line-height
2425
p.caption
2526
font-style: italic
2627
p:last-child.caption
2728
margin-bottom: 0px
28-
29-
div.figure.align-center
30-
text-align: center
31-
32-
// Usually it's a good idea to give images some space.
33-
.section > img, .section > a > img
34-
margin-bottom: $base-line-height
29+
&.align-center
30+
text-align: center
3531

3632
// normalize browser styling
3733
abbr[title]
@@ -147,36 +143,39 @@
147143
td, th
148144
background: transparent !important
149145
border-color: rgba(0, 0, 0, 0.1) !important
150-
.section ul, .toctree-wrapper ul
151-
@extend .wy-plain-list-disc
152-
.section ol.loweralpha, .section ol.loweralpha > li
153-
list-style: lower-alpha
154-
.section ol.upperalpha, .section ol.upperalpha > li
155-
list-style: upper-alpha
156-
.section ol, ol.arabic
157-
@extend .wy-plain-list-decimal
158-
// Complex bullet lists, they have more item margins than simple lists
159-
.section ol li, .section ul li
160-
> *
161-
margin-top: $base-line-height / 2
162-
margin-bottom: $base-line-height / 2
163-
&:first-child
164-
margin-top: 0rem
165-
> p
166-
&, &:last-child
146+
147+
.section, section
148+
ul, .toctree-wrapper ul
149+
@extend .wy-plain-list-disc
150+
ol.loweralpha, ol.loweralpha > li
151+
list-style: lower-alpha
152+
ol.upperalpha, ol.upperalpha > li
153+
list-style: upper-alpha
154+
ol, ol.arabic
155+
@extend .wy-plain-list-decimal
156+
// Complex bullet lists, they have more item margins than simple lists
157+
ol li, ul li
158+
> *
159+
margin-top: $base-line-height / 2
160+
margin-bottom: $base-line-height / 2
161+
&:first-child
162+
margin-top: 0rem
163+
> p
164+
&, &:last-child
165+
margin-bottom: $base-line-height / 2
166+
&:only-child, &:only-child:last-child
167+
margin-bottom: 0rem
168+
> ul, > ol
167169
margin-bottom: $base-line-height / 2
168-
&:only-child, &:only-child:last-child
170+
// Simple lists, no item margins
171+
ol.simple li, ul.simple li
172+
> *
173+
margin-top: 0rem
169174
margin-bottom: 0rem
170-
> ul, > ol
171-
margin-bottom: $base-line-height / 2
172-
// Simple lists, no item margins
173-
.section ol.simple li, .section ul.simple li
174-
> *
175-
margin-top: 0rem
176-
margin-bottom: 0rem
177-
ul, ol
178-
margin-top: 0rem
179-
margin-bottom: 0rem
175+
ul, ol
176+
margin-top: 0rem
177+
margin-bottom: 0rem
178+
180179
.line-block
181180
margin-left: 0px
182181
margin-bottom: $base-line-height

0 commit comments

Comments
 (0)