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

Ill table formatting #13

Closed
nihiluis opened this issue Sep 21, 2020 · 8 comments
Closed

Ill table formatting #13

nihiluis opened this issue Sep 21, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@nihiluis
Copy link

Hi, thank you for the cool library!

I've encountered some table formatting issues.

  1. table which is smaller than one page: first page is just left blank
    grafik

  2. table which is bigger than one page: first page is filled properly, but table headers are displayed twice
    grafik

@timvink timvink added the bug Something isn't working label Sep 21, 2020
@timvink
Copy link
Owner

timvink commented Sep 21, 2020

Thanks @nihiluis ! Also the issue really helps.

The first is related to a page-break on tables, I can remove that. The second I'll need to look into.

Will fix in next release!

@timvink
Copy link
Owner

timvink commented Sep 21, 2020

So the first issue is actually a feature, where it tries to avoid having a page break in a table whenever possible. I actually suspect mkdocs-material theme set something like table {page-break-before: avoid;}. I think that behaviour is more appriopriate in most cases.

The duplication of the table heading is specific for mkdocs-material theme:

image
image

I tried adding thead { display: table-row; } but that breaks the printing functionality in chrome for me (print preview page disappears).

I'm not a CSS expert, but this might have to do with how data tables are printed. I'm not sure if it can/should be solved in this plugin.

I might need some help here..

@timvink
Copy link
Owner

timvink commented Sep 21, 2020

@squidfunk This plugin offers some nice printing for mkdocs themes. Do you think printing data tables can be addressed Material for MkDocs (see screenshots above)? Would really appreciate some advice here!

@squidfunk
Copy link
Sponsor Collaborator

Printing from Chrome and Firefox works nicely for me, e.g. here's a Chrome print preview:

Bildschirmfoto 2020-09-22 um 09 59 51

I haven't tested with overly long tables, though. I'm currently low on time for these kinds of edge cases. Care to investigate and PR?

@timvink
Copy link
Owner

timvink commented Sep 22, 2020

I've tried to no avail.., CSS is not my expertise.

What I can do is create a small reproducible example and open an issue in mkdocs-material, to park it for later? Perhaps there is also someone willing&able to work on a PR there?

@squidfunk
Copy link
Sponsor Collaborator

squidfunk commented Sep 22, 2020

Sure, we can start with an issue with a reproducible case with all plugins removed. If it happens with stock Material, we can and should fix it, if possible. If it's related to this plugin, we could introduce some additional CSS to make it compatible if reasonable, but somebody would have to take the lead and PR then.

@timvink
Copy link
Owner

timvink commented Sep 22, 2020

I opened squidfunk/mkdocs-material#1939 and included a minimal reproducable example.

Closing this one.

@timvink timvink closed this as completed Sep 22, 2020
@timvink
Copy link
Owner

timvink commented Sep 23, 2020

@nihiluis This issue is now solved in mkdocs-material. That package releases very often, so solution should be on pypi soon.

Let me know if you encounter any other issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants