Skip to content

Commit

Permalink
Merge branch 'master' into search-hide-edit-links
Browse files Browse the repository at this point in the history
  • Loading branch information
stsewd committed Jun 22, 2020
2 parents bdd77df + aa71fd6 commit ecc58ad
Show file tree
Hide file tree
Showing 11 changed files with 99 additions and 19 deletions.
25 changes: 25 additions & 0 deletions docs/changelog.rst
Expand Up @@ -5,9 +5,34 @@ Changelog
master
======

v0.5.0
======

:Date: Jun 17, 2020

Fixes
-----

* Fix bullet list spacing to respect simple/complex list styles

v0.5.0rc2
=========

:Date: June 5, 2020

Fixes
-----

* Fix issue with simple definition lists that was missed
* Change FOUT back to FOIT
* Fix several margin issues with lists, nested lists, and nested content
* Add colon back to field lists

v0.5.0rc1
=========

:Date: May 6, 2020

Fixes
-----

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Expand Up @@ -26,8 +26,8 @@ def is_development_build():

project = u'Read the Docs Sphinx Theme'
slug = re.sub(r'\W+', '-', project.lower())
version = '0.5.0rc2'
release = '0.5.0rc2'
version = '0.5.0'
release = '0.5.0'
author = u'Dave Snider, Read the Docs, Inc. & contributors'
copyright = author
language = 'en'
Expand Down
36 changes: 35 additions & 1 deletion docs/demo/lists_tables.rst
Expand Up @@ -130,6 +130,28 @@ Field list
Bullet Lists
------------

..
Docutils supports two types of lists, "simple" and "complex". Complex lists
have item margins, simple lists do not.
https://docutils.sourceforge.io/sandbox/html4strict/data/simple-lists.html
Simple
^^^^^^

- A simple list.
- There are no margins between list items.
- Simple lists do not contain multiple paragraphs. That's a complex list.
- In the case of a nested list

- There are no margins between elements

- Still no margins

- Still no margins

Complex
^^^^^^^

- A bullet list

+ Nested bullet list.
Expand All @@ -150,6 +172,13 @@ Bullet Lists
- ``inline literall``
- ``inline literall``
- ``inline literall``
- This item has multiple paragraphs.

This item has multiple paragraphs.
- This item has multiple paragraphs.

This item has multiple paragraphs.


Second list level
^^^^^^^^^^^^^^^^^
Expand All @@ -162,7 +191,7 @@ Second list level
- here is an inner bullet ``oh``

- one more ``with an inline literally``. `yahoo <http://www.yahoo.com>`_

heh heh. child. try to beat this embed:

.. literalinclude:: test_py_module/test.py
Expand All @@ -172,6 +201,11 @@ Second list level
- and another. `yahoo <http://www.yahoo.com>`_
- `yahoo <http://www.yahoo.com>`_
- ``hi``
- how about an admonition?

.. note::
This is a note nested in a list.

- and hehe

But deeper down the rabbit hole
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "sphinx_rtd_theme",
"main": "js/theme.js",
"version": "0.5.0rc2",
"version": "0.5.0",
"private": true,
"scripts": {
"dev": "webpack-dev-server --open --config webpack.dev.js",
Expand Down
6 changes: 5 additions & 1 deletion setup.cfg
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.5.0rc2
current_version = 0.5.0
commit = false
tag = false
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>[a-z]+)(?P<dev>\d+))?
Expand Down Expand Up @@ -49,4 +49,8 @@ first_value = 1
search = "version": "{current_version}",
replace = "version": "{new_version}",

[bumpversion:file:package-lock.json]
search = "version": "{current_version}",
replace = "version": "{new_version}",

[bumpversion:file:docs/conf.py]
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -85,7 +85,7 @@ def run(self):

setup(
name='sphinx_rtd_theme',
version='0.5.0rc2',
version='0.5.0',
url='https://github.com/rtfd/sphinx_rtd_theme/',
license='MIT',
author='Dave Snider, Read the Docs, Inc. & contributors',
Expand Down
2 changes: 1 addition & 1 deletion sphinx_rtd_theme/__init__.py
Expand Up @@ -9,7 +9,7 @@
import sphinx


__version__ = '0.5.0rc2'
__version__ = '0.5.0'
__version_full__ = __version__


Expand Down
4 changes: 2 additions & 2 deletions sphinx_rtd_theme/footer.html
Expand Up @@ -46,12 +46,12 @@
</div>

{%- if show_sphinx %}
{% set sphinx_web = '<a href="http://sphinx-doc.org/">Sphinx</a>' %}
{% set sphinx_web = '<a href="https://www.sphinx-doc.org/">Sphinx</a>' %}
{% set readthedocs_web = '<a href="https://readthedocs.org">Read the Docs</a>' %}
{# Translators: the variable "sphinx_web" is a link to the Sphinx project documentation with the text "Sphinx" #}
{% trans sphinx_web=sphinx_web, readthedocs_web=readthedocs_web %}Built with {{ sphinx_web }} using a{% endtrans %}
{# Translators: "theme" refers to a theme for Sphinx, which alters the appearance of the generated documenation #}
<a href="https://github.com/rtfd/sphinx_rtd_theme">{% trans %}theme{% endtrans %}</a>
<a href="https://github.com/readthedocs/sphinx_rtd_theme">{% trans %}theme{% endtrans %}</a>
{# Translators: this is always used as "provided by Read the Docs", and should not imply Read the Docs is an author of the generated documentation. #}
{% trans %}provided by {{ readthedocs_web }}{% endtrans %}.
{%- endif %}
Expand Down
2 changes: 1 addition & 1 deletion sphinx_rtd_theme/static/css/theme.css

Large diffs are not rendered by default.

33 changes: 25 additions & 8 deletions src/sass/_theme_rst.sass
Expand Up @@ -117,7 +117,7 @@
// These block elements are unsuitable for having floating objects next
// to them
clear: both
.last
.last, > *:last-child
margin-bottom: 0
.admonition-title
@extend .wy-alert-title
Expand Down Expand Up @@ -147,12 +147,27 @@
list-style: upper-alpha
.section ol, ol.arabic
@extend .wy-plain-list-decimal
.section ol p, .section ul p
html.writer-html4 &
// 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
&:last-child
margin-bottom: $base-line-height
html.writer-html5 &
&: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
// 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
.line-block
margin-left: 0px
Expand Down Expand Up @@ -212,7 +227,7 @@
// Sidebar content is usually less relevant, so adjust the margins and sizes.
p, ul, dl
font-size: 90%
.last, *:last-child
.last, > *:last-child
margin-bottom: 0
.sidebar-title
display: block
Expand Down Expand Up @@ -269,6 +284,8 @@
grid-template-columns: max-content auto
> dt
padding-left: 1rem
&:after
content: ":"
> dt, > dd
margin-bottom: 0rem
dl.footnote
Expand Down Expand Up @@ -327,7 +344,7 @@
&:not(.field-list)
@extend .wy-table-striped
// Remove bottom margin for the last element (and it's last child)
td .last, td .last :last-child
td .last, td .last > *:last-child
margin-bottom: 0
// This table is what gets spit out for auto-generated API stuff. I style it smaller bits of padding.
table.field-list
Expand Down

0 comments on commit ecc58ad

Please sign in to comment.