Skip to content

Commit d426c11

Browse files
committed
Merge branch 'master' into agj/update-translations-rebase
2 parents 1ef6b5b + f237820 commit d426c11

File tree

7 files changed

+65
-49
lines changed

7 files changed

+65
-49
lines changed

docs/changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ New Features
1111
Fixes
1212
-----
1313

14+
* Fix definition lists looking different with Sphinx 2.0+
15+
1416
Other Changes
1517
--------------
1618

docs/demo/demo.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ citation references ([12]_), substitution references (|example|), and _`inline h
2525
text (generated by processing errors; this one is intentional).
2626

2727
Also with ``sphinx.ext.autodoc``, which I use in the demo, I can link to :class:`test_py_module.test.Foo`.
28-
It will link you right my code documentation for it.
28+
It will link you right to my code documentation for it.
2929

3030
The default role for interpreted text is `Title Reference`. Here are some explicit interpreted text roles:
3131
a PEP reference (:PEP:`287`); an RFC reference (:RFC:`2822`); a :sub:`subscript`; a :sup:`superscript`;

sass/_theme_font_local.sass

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,44 @@
44
src: url('../fonts/Lato/lato-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/Lato/lato-regular.woff2') format('woff2'), url('../fonts/Lato/lato-regular.woff') format('woff'), url('../fonts/Lato/lato-regular.ttf') format('truetype')
55
font-weight: 400
66
font-style: normal
7+
font-display: $font-display
78

89
@font-face
910
font-family: 'Lato'
1011
src: url('../fonts/Lato/lato-bold.eot')
1112
src: url('../fonts/Lato/lato-bold.eot?#iefix') format('embedded-opentype'), url('../fonts/Lato/lato-bold.woff2') format('woff2'), url('../fonts/Lato/lato-bold.woff') format('woff'), url('../fonts/Lato/lato-bold.ttf') format('truetype')
1213
font-weight: 700
1314
font-style: normal
14-
15+
font-display: $font-display
1516

1617
@font-face
1718
font-family: 'Lato'
1819
src: url('../fonts/Lato/lato-bolditalic.eot')
1920
src: url('../fonts/Lato/lato-bolditalic.eot?#iefix') format('embedded-opentype'), url('../fonts/Lato/lato-bolditalic.woff2') format('woff2'), url('../fonts/Lato/lato-bolditalic.woff') format('woff'), url('../fonts/Lato/lato-bolditalic.ttf') format('truetype')
2021
font-weight: 700
2122
font-style: italic
23+
font-display: $font-display
2224

2325
@font-face
2426
font-family: 'Lato'
2527
src: url('../fonts/Lato/lato-italic.eot')
2628
src: url('../fonts/Lato/lato-italic.eot?#iefix') format('embedded-opentype'), url('../fonts/Lato/lato-italic.woff2') format('woff2'), url('../fonts/Lato/lato-italic.woff') format('woff'), url('../fonts/Lato/lato-italic.ttf') format('truetype')
2729
font-weight: 400
2830
font-style: italic
31+
font-display: $font-display
2932

3033
@font-face
3134
font-family: 'Roboto Slab'
3235
font-style: normal
3336
font-weight: 400
3437
src: url('../fonts/RobotoSlab/roboto-slab.eot')
3538
src: url('../fonts/RobotoSlab/roboto-slab-v7-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/RobotoSlab/roboto-slab-v7-regular.woff2') format('woff2'), url('../fonts/RobotoSlab/roboto-slab-v7-regular.woff') format('woff'), url('../fonts/RobotoSlab/roboto-slab-v7-regular.ttf') format('truetype')
39+
font-display: $font-display
3640

3741
@font-face
3842
font-family: 'Roboto Slab'
3943
font-style: normal
4044
font-weight: 700
4145
src: url('../fonts/RobotoSlab/roboto-slab-v7-bold.eot')
4246
src: url('../fonts/RobotoSlab/roboto-slab-v7-bold.eot?#iefix') format('embedded-opentype'), url('../fonts/RobotoSlab/roboto-slab-v7-bold.woff2') format('woff2'), url('../fonts/RobotoSlab/roboto-slab-v7-bold.woff') format('woff'), url('../fonts/RobotoSlab/roboto-slab-v7-bold.ttf') format('truetype')
47+
font-display: $font-display

sass/_theme_rst.sass

Lines changed: 48 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -323,54 +323,56 @@
323323
// This makes me terribly unhappy and makes this code very nesty. Unfortunately I've seen hand-written docs
324324
// that output similar, but not quite the same nesting so this is really the best we can do.
325325
dl:not(.docutils)
326-
margin-bottom: $base-line-height
327-
// This would be the equivilant of a .. class::
328-
dt
329-
display: table
330-
margin: $base-line-height / 4 0
331-
font-size: 90%
332-
line-height: normal
333-
background: lighten($class-color, 50%)
334-
color: $class-color
335-
border-top: solid 3px lighten($class-color, 20%)
336-
padding: $base-line-height / 4
337-
position: relative
338-
&:before
339-
color: lighten($class-color, 20%)
340-
.headerlink
341-
color: $text-color
342-
font-size: 100% !important
343-
// And this would be the .. method::
344-
dl dt
345-
margin-bottom: $base-line-height / 4
346-
border: none
347-
border-left: solid 3px hsl(0,0%,80%)
348-
background: hsl(0,0%,94%)
349-
color: $method-color
350-
.headerlink
351-
color: $headerlink-color
352-
font-size: 100% !important
353-
dt:first-child
354-
margin-top: 0
355-
// Since dts get the callout style, we treat this less as callouts.
356-
tt, code
357-
font-weight: bold
358-
&.descname, &.descclassname
359-
background-color: transparent
326+
// In Sphinx 2.0+ most DLs no longer contain .docutils, needs tighter scoping using next line
327+
&.class, &.data
328+
margin-bottom: $base-line-height
329+
// This would be the equivilant of a .. class::
330+
dt
331+
display: table
332+
margin: $base-line-height / 4 0
333+
font-size: 90%
334+
line-height: normal
335+
background: lighten($class-color, 50%)
336+
color: $class-color
337+
border-top: solid 3px lighten($class-color, 20%)
338+
padding: $base-line-height / 4
339+
position: relative
340+
&:before
341+
color: lighten($class-color, 20%)
342+
.headerlink
343+
color: $text-color
344+
font-size: 100% !important
345+
// And this would be the .. method::
346+
dl dt
347+
margin-bottom: $base-line-height / 4
360348
border: none
361-
padding: 0
362-
font-size: 100% !important
363-
&.descname
349+
border-left: solid 3px hsl(0,0%,80%)
350+
background: hsl(0,0%,94%)
351+
color: $method-color
352+
.headerlink
353+
color: $headerlink-color
354+
font-size: 100% !important
355+
dt:first-child
356+
margin-top: 0
357+
// Since dts get the callout style, we treat this less as callouts.
358+
tt, code
364359
font-weight: bold
365-
// This is for more advanced parameter control
366-
.optional
367-
display: inline-block
368-
padding: 0 4px
369-
color: $black
370-
font-weight: bold
371-
.property
372-
display: inline-block
373-
padding-right: 8px
360+
&.descname, &.descclassname
361+
background-color: transparent
362+
border: none
363+
padding: 0
364+
font-size: 100% !important
365+
&.descname
366+
font-weight: bold
367+
// This is for more advanced parameter control
368+
.optional
369+
display: inline-block
370+
padding: 0 4px
371+
color: $black
372+
font-weight: bold
373+
.property
374+
display: inline-block
375+
padding-right: 8px
374376
// Doc links to sourcecode
375377
.viewcode-link, .viewcode-back
376378
display: inline-block

sass/_theme_variables.sass

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,5 @@ $base-font-family: "Lato", "proxima-nova", "Helvetica Neue",
6565
$custom-font-family: "Roboto Slab", "ff-tisa-web-pro", "Georgia", Arial, sans-serif
6666
$custom-font-family2: Georgia, serif
6767
$code-font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace
68+
69+
$font-display: swap

sphinx_rtd_theme/layout.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
{% endif %}
3030

3131
{# JAVASCRIPTS #}
32+
{%- block scripts %}
3233
<script type="text/javascript" src="{{ pathto('_static/js/modernizr.min.js', 1) }}"></script>
3334
{%- if not embedded %}
3435
{# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #}
@@ -62,6 +63,7 @@
6263
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
6364
{%- endif %}
6465
{%- endif %}
66+
{%- endblock %}
6567

6668
{# CSS #}
6769
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />

sphinx_rtd_theme/search.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
#}
1010
{%- extends "layout.html" %}
1111
{% set title = _('Search') %}
12-
{% set script_files = script_files + ['_static/searchtools.js'] %}
12+
{%- block scripts %}
13+
{{ super() }}
14+
<script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>
15+
{%- endblock %}
1316
{% block footer %}
1417
<script type="text/javascript">
1518
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });

0 commit comments

Comments
 (0)