(core) Add some media queries to improve printing

Summary:
- Hides left and right panels and the top bar
- Hides cursor and active-section highlight
- Hides "=" icon on formulas
- Nudges browser to include background for row/column headers, which is not
  otherwise included.

Still only what's visible is printed (e.g. large tables not paginated).

Test Plan: Tried a few pages manually on Firefox and Chrome.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D2579
pull/4/head
Dmitry S 4 years ago
parent 3c9ff4a703
commit 4e20f7a8a2

@ -139,6 +139,11 @@ export const cssLeftPane = styled(cssVBox, `
min-width: 160px;
max-width: 320px;
}
@media print {
& {
display: none;
}
}
`);
const cssMainPane = styled(cssVBox, `
position: relative;
@ -160,6 +165,11 @@ const cssRightPane = styled(cssVBox, `
min-width: 240px;
max-width: 320px;
}
@media print {
& {
display: none;
}
}
`);
const cssTopHeader = styled('div', `
height: 48px;
@ -168,6 +178,12 @@ const cssTopHeader = styled('div', `
align-items: center;
justify-content: space-between;
border-bottom: 1px solid ${colors.mediumGrey};
@media print {
& {
display: none;
}
}
`);
const cssResizeFlexVHandle = styled(resizeFlexVHandle, `
--resize-handle-color: ${colors.mediumGrey};

Loading…
Cancel
Save