Skip to content

Commit 21fd7db

Browse files
authored
Merge pull request #1185 from readthedocs/docutils0.17.1
Add support for docutils 0.17
2 parents 7500f33 + ce74456 commit 21fd7db

File tree

3 files changed

+46
-39
lines changed

3 files changed

+46
-39
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.18',
123123
],
124124
tests_require=[
125125
'pytest',

sphinx_rtd_theme/static/css/theme.css

Lines changed: 2 additions & 2 deletions
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: 43 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,28 @@
1414
// --------------------------------------------------------------------------------------------------------------------
1515
1616
.rst-content
17+
// Some browsers like to give arbituary margins :( make them all consistent.
18+
h1, h2, h3, h4, h5, h6
19+
margin-bottom: $base-line-height
20+
1721
// Sphinx by default applies HxW style attributes to images. This fixes that oversite.
1822
img
1923
max-width: 100%
2024
height: auto
2125

22-
div.figure
26+
div.figure, figure
2327
margin-bottom: $base-line-height
24-
p.caption
28+
.caption-text
2529
font-style: italic
2630
p:last-child.caption
2731
margin-bottom: 0px
28-
29-
div.figure.align-center
30-
text-align: center
32+
&.align-center
33+
text-align: center
3134

3235
// Usually it's a good idea to give images some space.
33-
.section > img, .section > a > img
34-
margin-bottom: $base-line-height
36+
.section, section >
37+
img, a > img
38+
margin-bottom: $base-line-height
3539

3640
// normalize browser styling
3741
abbr[title]
@@ -147,36 +151,39 @@
147151
td, th
148152
background: transparent !important
149153
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
154+
155+
.section, section
156+
ul, .toctree-wrapper ul
157+
@extend .wy-plain-list-disc
158+
ol.loweralpha, ol.loweralpha > li
159+
list-style: lower-alpha
160+
ol.upperalpha, ol.upperalpha > li
161+
list-style: upper-alpha
162+
ol, ol.arabic
163+
@extend .wy-plain-list-decimal
164+
// Complex bullet lists, they have more item margins than simple lists
165+
ol li, ul li
166+
> *
167+
margin-top: $base-line-height / 2
168+
margin-bottom: $base-line-height / 2
169+
&:first-child
170+
margin-top: 0rem
171+
> p
172+
&, &:last-child
173+
margin-bottom: $base-line-height / 2
174+
&:only-child, &:only-child:last-child
175+
margin-bottom: 0rem
176+
> ul, > ol
167177
margin-bottom: $base-line-height / 2
168-
&:only-child, &:only-child:last-child
178+
// Simple lists, no item margins
179+
ol.simple li, ul.simple li
180+
> *
181+
margin-top: 0rem
169182
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
183+
ul, ol
184+
margin-top: 0rem
185+
margin-bottom: 0rem
186+
180187
.line-block
181188
margin-left: 0px
182189
margin-bottom: $base-line-height
@@ -206,7 +213,7 @@
206213
@extend h2
207214

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

0 commit comments

Comments
 (0)