pydata / pydata-sphinx-theme

A clean, three-column Sphinx theme with Bootstrap for the PyData community
https://pydata-sphinx-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
600 stars 313 forks source link

Wrong `pre` block width in field lists #1242

Closed VForiel closed 7 months ago

VForiel commented 1 year ago

Discussed in https://github.com/pydata/pydata-sphinx-theme/discussions/1230

When a pre block that contain long lines is placed in a field list, it crush the field labels and expand to the infinite on the right instead on creating an horizontal scroll bar

Example here: https://bookshelf.docs.gunivers.net/en/latest/modules/math.html#basis-rotation-3d


Originally posted by **Leirof** March 3, 2023 Hi! I just installed the Pydata theme (and it's awsome !), but I have an issue with field list that are totally crushed as you can see here: https://bookshelf.docs.gunivers.net/en/latest/modules/math.html#rounded-division ("Inputs:", "Outputs" and "Examples:" are not supposed to be vertical 😅) Do I need to use a custom CSS rule to fix that or is there a simpler way? If I have to user CSS, how can I put a variable size depending of the larget field label?
trallard commented 1 year ago

Thanks @Leirof think we have two components issues going on here:

  1. The x scrollbar not appearing in the code blocks
  2. The labels (inside dd and dt elements - this seems to be a problem with the word-break property)

I will have a quick look at these issues.

12rambau commented 1 year ago

we release new versions since you opened this PR and when clicking on the examples I don't see any issue. My guess is that the documentation has been rebuild since then. Do you still face the problem somewhere in your doc ?

trallard commented 7 months ago

We haven't gotten a response to our questions in our comment https://github.com/pydata/pydata-sphinx-theme/issues/1242#issuecomment-1557183571. With only the current information on the issue, we don't have enough information to take action. I will close this but don't hesitate to reach out if you have or find the answers we need. We'll be happy to reopen the issue.