React-to-print: Some styles not appearing on print

Created on 17 Jun 2020  路  8Comments  路  Source: gregnb/react-to-print

When I click print on my printing button it print everything I want, but it breaks the styles from children that have the display flex on my css (display:flex).

The code:
```jsx
return (
<>

Most helpful comment

Then same thing is happening to me it breaks the display flex

All 8 comments

Hello. Could you by chance make a codesandbox that replicates your issue? It's hard to diagnose any problems without having all of the working code

Okay, I'll create a codesandbox and send it to you, thanks!

Thanks, I'll take a look when I get some free time

Then same thing is happening to me it breaks the display flex

me too

me too!

Trying to re-visit this, could someone please provide me with a working codesandbox showing the issue? The above ones no longer seem to work. Also, to be clear: the print is based on the size of a piece of paper (a size you can change in CSS). If you are trying to print a page that is wider or taller than the page size of the paper there is no possible way it is ever going to look right for you. You would need styles similar to handling mobile devices, though possibly within an @media print query

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jogoool picture jogoool  路  8Comments

k-jiang picture k-jiang  路  5Comments

sprietNathanael picture sprietNathanael  路  4Comments

icebravo picture icebravo  路  5Comments

MikeSha picture MikeSha  路  4Comments