mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Implement 'Print widget' option to print individual view sections.
Summary: - Supports multi-page printing with some aggressive css overrides. - Relies on a new function implemented by grist-plugin-api to print a multi-page CustomView. - Renders all rows for printing for scrolly-based views. Test Plan: Doesn't seem possible to do a selenium test for printing. Tested manually on Chrome, Firefox, and Safari. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2635
This commit is contained in:
60
app/client/components/Printing.css
Normal file
60
app/client/components/Printing.css
Normal file
@@ -0,0 +1,60 @@
|
||||
@media print {
|
||||
/* Various style overrides needed to print a single section (page widget). */
|
||||
|
||||
.print-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.print-parent {
|
||||
display: block !important;
|
||||
position: relative !important;
|
||||
height: max-content !important;
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
.print-widget {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.print-widget .viewsection_title {
|
||||
display: none !important;
|
||||
}
|
||||
.print-widget .view_data_pane_container {
|
||||
border: none !important;
|
||||
}
|
||||
.print-widget .viewsection_content {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.print-widget .detailview_single {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.print-widget .gridview_data_pane {
|
||||
display: block !important;
|
||||
position: relative !important;
|
||||
height: max-content !important;
|
||||
overflow: visible !important;
|
||||
border-top: 1px solid var(--grist-color-dark-grey);
|
||||
border-left: 1px solid var(--grist-color-dark-grey);
|
||||
}
|
||||
|
||||
.print-widget .gridview_data_scroll {
|
||||
position: relative !important;
|
||||
height: max-content !important;
|
||||
}
|
||||
|
||||
.print-widget .scrolly_outer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.print-widget .custom_view {
|
||||
height: calc(100vh - 24px);
|
||||
}
|
||||
}
|
||||
|
||||
@media not print {
|
||||
.print-all-rows {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user