Skip to content

Commit c598cc5

Browse files
authored
Merge pull request #7730 from nextcloud/backport/7729/stable31
[stable31] fix(print): Overwrite `display: grid` to prevent cut content
2 parents 372055b + f1d5984 commit c598cc5

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

src/css/print.scss

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,13 @@
5757
// Hide menu bar
5858
display: none!important;
5959
}
60-
.action-item {
61-
// Hide table settings
60+
.action-item, .table-add-column, .table-add-row {
61+
// Hide table buttons
6262
display: none!important;
6363
}
6464
.content-wrapper .editor__content {
65+
// Prevent cut lines (due to `display: grid`)
66+
display: block;
6567
// Margins set by page rule
6668
max-width: 100%;
6769
}
@@ -81,34 +83,26 @@
8183
page-break-after: avoid;
8284
}
8385
.image, img, table {
86+
// make sure table content fits page width
87+
overflow-wrap: anywhere;
8488
// try no page breaks within tables or images
8589
break-inside: avoid-page;
8690
page-break-inside: avoid;
87-
// Some more indention
88-
max-width: 90%!important;
89-
margin: 5vw auto 5vw 5%!important;
9091
}
9192

9293
// Add some borders below header and between columns
9394
th {
9495
color: black!important;
9596
font-weight: bold!important;
96-
border-width: 0 1px 2px 0!important;
97+
border-width: 1px !important;
98+
border-bottom-width: 2px !important;
9799
border-color: gray!important;
98-
border-style: none solid solid none!important;
99-
}
100-
th:last-of-type {
101-
border-width: 0 0 2px 0!important;
102100
}
103101

104102
td {
105-
border-style: none solid none none!important;
106103
border-width: 1px!important;
107104
border-color: gray!important;
108105
}
109-
td:last-of-type {
110-
border: none!important;
111-
}
112106
}
113107
}
114108
}

0 commit comments

Comments
 (0)