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 2 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
2 changes: 1 addition & 1 deletion sphinx_rtd_theme/static/css/theme.css

Large diffs are not rendered by default.

71 changes: 35 additions & 36 deletions src/sass/_theme_rst.sass
Expand Up @@ -16,22 +16,18 @@
.rst-content
// Sphinx by default applies HxW style attributes to images. This fixes that oversite.
img
margin-bottom: $base-line-height
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming there will probably be unwanted side effects from this, img is a pretty generic selector. Is this on purpose? Looks like the original selector was a bit more specific, at .rst-content .section > img

max-width: 100%
height: auto

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

div.figure.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
&.align-center
text-align: center

// normalize browser styling
abbr[title]
Expand Down Expand Up @@ -147,36 +143,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