[15.10] Bug or Feature Request: CSS visibility width classes do not work in media print mode.
All elements tagged with the quasar css width classes like "lt-md" or "gt-mt" behave like window breakpoints are now XS when in print media mode.
I would expect the printout to represent current screen layout except where using "print-only" and "print-hide" css classes.
Anyone have an idea on how to handle this?
Thanks!
Hi. Yes, because the print page has different size.
I guessed window size was the issue, though there is no way the printout is going into that small of a width...
How about adding a print-always css class then? That way we can hide and force what elements are printed regardless of screen size.
I think you are missing the point. The print page is still a page. So it's up to the developer to write a css print media query to tweak things however he/she wants if the default does not fits the needs. That's if the "print-only" or "print-hide" CSS classes are not enough. There's no golden solution -- and it's outside of Quasar's responsibility, as the scenarios are endless.
Understood, was just suggesting adding the missing piece to your already created printer related CSS classes.
I've already fixed my code to deal with this using my own print-always class:
@media print {
.print-always {
display: block !important;
}
}
Framework code needs to be as generic as possible. "display: block" might work for your particular case, but what if the DOM element initially has "display: flex"? And it goes on and on and on :)