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

Text wrap in tables #205

Closed
Zsailer opened this issue Jun 19, 2020 · 6 comments · Fixed by #211 or #717
Closed

Text wrap in tables #205

Zsailer opened this issue Jun 19, 2020 · 6 comments · Fixed by #211 or #717

Comments

@Zsailer
Copy link

Zsailer commented Jun 19, 2020

Hey all! First, thank you for all the great work here! I'm a big fan of this theme.

I'm having some issues trying to get text to wrap in tables. We came across this issue in JupyterHub's documentation pages. See this page for an example. For reference, we have an issue opened on jupyterhub here here.

I've had to write custom CSS to enable text wrapping for other sphinx themes, but I'm not sure how to do that here. Any pointers?

@jorisvandenbossche
Copy link
Member

As a start, I would check how it looks with the latest version of the theme, as there have been some fixes/changes related to this (not sure whether it would fix this, though).

@choldgraf
Copy link
Collaborator

Another thought there - @Zsailer could you open a PR to this theme that adds an offending table to the demo docs? Then we can merge it as a "visual test" whenever this is resolved.

@Zsailer
Copy link
Author

Zsailer commented Jun 19, 2020

@jorisvandenbossche, thanks! I just tried it with the latest version—still no luck here.

@choldgraf, sure. I'll work on such a PR when I get a chance. I'll try to dive into the theme, too.

@bollwyvl
Copy link
Collaborator

The offender is probably this td rule. These aren't really available at the jinja level. A custom DOM class would have to be added with a visitor to be able to increase the selectivity, e.g. autosummary.

Next up, if you hack that, even through the browser, that hub docs page would then have everything centered, though that might be fixed on master. I agree a some big old complicated tables (wide and long) with lots of merged cells and long text would be really helpful for this pounding on this kind of stuff...

@bollwyvl
Copy link
Collaborator

Opened up #211: even without the stress test case, it's possible to see the differences between:

So it's probably good to go!

@jorisvandenbossche
Copy link
Member

@bollwyvl thanks, that's a nice solution (I struggled quite a bit with that autosummary table ..)

But it's probably still good to add such a large table test case to the docs to easily check in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants