-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Grid stacks when printing in IE 11 or Chrome 34 #12078
Comments
Although, running the unit conversions and other math:
So theoretically it seems like it should use the Small (non-stacked) grid, but I'm probably missing something that's eating those last 10px. At any rate, it's pretty close. |
With regard to international ISO standard paper sizes:
|
Can anything be done to avoid the stacking? |
@gordanj Either:
|
Thanks, @cvrebert! I appreciate your attention to this. Using the XS/extra-small grid seems like a bad idea, though. A printed page is an inherently different size and format than a small viewport. I like the idea of changing the media query only for the print styles to be a smaller breakpoint. If anyone gets a working version of that approach please share it. I'll try to explore it myself as well, but the Bootstrap Customizer wasn't working for me this morning. |
I found the following section and changed it from 768px to 585px which is the highest it could be before it stacks. If someone has a better suggestion, please share. @media (min-width: 768px) { CHANGE TO: @media (min-width: 585px) { |
How does one correctly combine media queries? Targeting only print and changing the small grid viewport breakpoint? I cannot seem to get it working. |
Are we expecting a bug fix for something here, something added to the docs, or something else? |
Regardless of whether a browser bug/quirk is causing US Letter paper to seems XS-sized, we're still "broken" with respect to A4 paper (which is narrower and thus unambiguously XS).
Since that's backward-incompatible and thus would have to wait for v4, we should probably document this pitfall for now. Though it would still be nice to figure out why we're not fitting on US Letter even though the math says we should. |
#12250 Adjusting page margins in the print media query didn't do much for me in this case. |
My revised conclusion after testing a bit more is that this could get complicated enough that we may want to deem this as being outside the scope of the project. |
Environment:
Investigation results:
|
Possibly relevant Chromium issue: https://code.google.com/p/chromium/issues/detail?id=273306 |
Yeah printing is a pile of problems. I'd say we punt on trying to do anything for this. |
Sounds good. I'll add a note to the docs. |
My man. |
Addressed in #12345. |
IE 9+ actually works very nicely. Simply use the @page min-width to force IE's default "scale to fit" mode to scale the printed output down a little so it fits on the page. And the user can scale it smaller and/or switch to landscape mode in the preview window to produce a MD or LG format as well. Unfortunately it doesn't help Chrome. Here's my CSS, which also forces the container to fill the width of the paper: @page {
min-width: 768px;
}
@media print {
body {
margin: 0;
padding 0 !important;
min-width: 768px;
}
.container {
width: auto;
min-width: 750px;
}
} |
I just wanted to share our solution here (using bootstrap-sass). Modifying the print specific breakpoints was not working so we used this workaround. Within our print specific stylesheets where we wanted elements to not stack (media=print), we selected these elements and extended the relevant Within our selector .col-md-4 {
@extend .col-xs-4;
}
selector .col-md-8 {
@extend .col-xs-8;
} Feel free to checkout the pr here: |
When printing in Safari 7 and Firefox 25 the grid carries over to the print style, but in Chrome 34 and IE 11 everything stacks when printed. Any insights here?
The text was updated successfully, but these errors were encountered: