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

toctree captions are missing the caption class on the main p element #9051

Closed
ocharles opened this issue Apr 3, 2021 · 8 comments
Closed

Comments

@ocharles
Copy link

ocharles commented Apr 3, 2021

Describe the bug

Please see readthedocs/sphinx_rtd_theme#1111, though I think I'm encountering a Sphinx bug, rather than a bug in that particular theme.

To Reproduce
Steps to reproduce the behavior:

<Paste your command-line here which cause the problem>

$ git clone git://github.com/circuithub/rel8
$ cd docs
$ pip install -r requirements.txt
$ make html
$ # open _build/html/index

Expected behavior

Each toctree caption would be a <p class="caption"> element, which sphinx-rtd-theme will style specially.

Screenshots
Screenshots are on readthedocs/sphinx_rtd_theme#1111

Environment info

  • OS: Linux NixOS
  • Python version: 3.8.8
  • Sphinx version: 3.5.3
@tk0miya tk0miya modified the milestones: 4.1.0, 4.0.0 Apr 4, 2021
@tk0miya
Copy link
Member

tk0miya commented Apr 4, 2021

Good timing! I posted #9053 to fix the trouble. Please try it if you have time :-)

@Blendify
Copy link
Contributor

Blendify commented Apr 6, 2021

We have some reports on the rtd theme that unordered list are also broken.

@tk0miya
Copy link
Member

tk0miya commented Apr 7, 2021

@Blendify

We have some reports on the rtd theme that unordered list are also broken.

Could you explain this in detail?

@Blendify
Copy link
Contributor

Blendify commented Apr 7, 2021

After looking into it, this seems not related to sphinx but our css. The issue comes from the change from <div class="section"> to <section> or css selector for lists is .section ol we will need to update our css to fix this. The built sphinx theme may also need to be updated. I see at least an issue here: https://github.com/sphinx-doc/sphinx/blob/master/sphinx/themes/basic/static/basic.css_t#L18

@tk0miya
Copy link
Member

tk0miya commented Apr 8, 2021

@Blendify Do you have any example to reproduce the HTML output? I'd like to fix CSS, but I need to reproduce it before fix it.

@tk0miya
Copy link
Member

tk0miya commented Apr 8, 2021

I merged #9053 to the 3.5.x branch now. So the main topic of this issue is resolved in the next bugfix release.
I'll wait for a comment of Blendify for a little and will close this.

@Blendify
Copy link
Contributor

Blendify commented Apr 8, 2021

Just to clarify, the issue with unordered lists is specific to the rtd-sphinx-theme and is an issue on our end.

Do you have any example to reproduce the HTML output? I'd like to fix CSS, but I need to reproduce it before fix it.

With docutils 0.17 rst headings get

before 0.17 they get
.

Just use a simple page like:

*****
Title
*****

Section 1
=======

Lorem Ipsum.

Section2
=======

Lorem Ipsum.

To fix, check for all instances of .section in css files and add the same css selection but use the section tag instead of the class.

There may be more cases so we should check for all uses of new semantic tags:

<main>, <section>, <header>, <footer>, <aside>, <figure>, and <figcaption>

for example, I also see that div.figure will have to be converted to figure

ericholscher added a commit to ericholscher/sphinx that referenced this issue Apr 9, 2021
This will address the issues that the latest docutils release caused.
I think thi si a good practice in general to make sure we have a defined range of docutils versions,
given that they might change in the future.
Having this defined will mean that 3.x versions of Sphinx will always work,
even when docutils has advanced with additional backwards incompatible features.

Refs sphinx-doc#9065 sphinx-doc#9063 sphinx-doc#9061 sphinx-doc#9051
ericholscher added a commit to ericholscher/sphinx that referenced this issue Apr 9, 2021
This will address the issues that the latest docutils release caused.
I think thi si a good practice in general to make sure we have a defined range of docutils versions,
given that they might change in the future.
Having this defined will mean that 3.x versions of Sphinx will always work,
even when docutils has advanced with additional backwards incompatible features.

Refs sphinx-doc#9065 sphinx-doc#9063 sphinx-doc#9061 sphinx-doc#9051
tk0miya added a commit to tk0miya/sphinx that referenced this issue Apr 10, 2021
Since docutils-0.17, figure directive starts to output `<figure>` tag.
To support it, this modifies CSS.
tk0miya added a commit to tk0miya/sphinx that referenced this issue Apr 10, 2021
Since docutils-0.17, figure directive starts to output `<figure>` tag.
To support it, this modifies CSS.
tk0miya added a commit that referenced this issue Apr 11, 2021
Fix #9051: html theme: The style for figure are not applied
@tk0miya
Copy link
Member

tk0miya commented Apr 11, 2021

Now I fixed the styles for <figure> tag on #9077. So I'm closing this now.

@tk0miya tk0miya closed this as completed Apr 11, 2021
nicozanf added a commit to nicozanf/py4web-doc that referenced this issue May 16, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants