.container causing printing problem on OS X Safari #14868

Closed
gr2m opened this Issue Oct 24, 2014 · 10 comments

Projects

None yet

3 participants

@gr2m
gr2m commented Oct 24, 2014

I've run into an issue with the latest Safari on Mac OS X (10.9 & 10.10), where the printed page had a much smaller font size than on all other browsers. It looked like the entire page was zoomed out.

What's causing this is .container. Once I set it to width: auto for @media print, the problem. You can see the effect a bit on this page: http://jsbin.com/kamafuluxe/3. The difference between the print on Safari and other browsers is much bigger in our internal app though.

Happy to send a pull request

@cvrebert cvrebert added the css label Oct 24, 2014
@cvrebert cvrebert changed the title from set widht for .container to auto for @media print to .container causing printing problem on OS X Safari Oct 24, 2014
@cvrebert
Member

Might need to file a WebKit/Safari bug too.

@mdo
Member
mdo commented Oct 28, 2014

Yeah, sounds like a browser inconsistency and not something we'd be able to control.

@gr2m
gr2m commented Oct 28, 2014

I agree, I'll try to make a reduced test case and keep you posted. Might be worth to list it as known issue.

But either way, is there anything that speaks against setting

@media print {
  .container {
    width: auto;
  }
}

Although the other browser seem to handle it fine that .container has a fixed width, I thing it would be more reliable to set it to auto so that it expands to the available place, to prevent browsers to potentially cut off content or to scale it down.

@mdo
Member
mdo commented Oct 28, 2014

That'd require some testing and I'm unsure if it's screw with folks' current expected behavior. If you're willing to thoroughly test it out, I'd be down to see a pull request.

@cvrebert
Member

Confirmed with Safari Version 8.0 (10600.1.25) on OS X Yosemite.

@cvrebert
Member

Environment:

Comparison of font sizes when printing (click for full resolution):
printouts

Once again (#12078), printing in browsers is screwy. 😡

And yes, @gr2m's workaround does make Safari scale things closer to the other browsers.

@cvrebert cvrebert added a commit that referenced this issue Oct 29, 2014
@cvrebert cvrebert Add Wall of Browser Bugs entry for #14868
Closes #14868
850a9a0
@cvrebert cvrebert closed this in #14920 Oct 29, 2014
@mdo
Member
mdo commented Oct 29, 2014

<3 you @cvrebert.

@cvrebert
Member

🐞s must 💀 !
😡 @ browser vendors.

@gr2m
gr2m commented Oct 30, 2014

Thanks @cvrebert, much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment