Giter Site home page Giter Site logo

Comments (8)

timvink avatar timvink commented on May 31, 2024 1

@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!

from mkdocs-print-site-plugin.

squidfunk avatar squidfunk commented on May 31, 2024 1

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.

from mkdocs-print-site-plugin.

timvink avatar timvink commented on May 31, 2024

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!

from mkdocs-print-site-plugin.

timvink avatar timvink commented on May 31, 2024

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..

from mkdocs-print-site-plugin.

squidfunk avatar squidfunk commented on May 31, 2024

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?

from mkdocs-print-site-plugin.

timvink avatar timvink commented on May 31, 2024

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?

from mkdocs-print-site-plugin.

timvink avatar timvink commented on May 31, 2024

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

Closing this one.

from mkdocs-print-site-plugin.

timvink avatar timvink commented on May 31, 2024

@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

from mkdocs-print-site-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.