Skip to content

Commit

Permalink
⚡ [#4255] Speed up PDF generation by replacing flexbox with float
Browse files Browse the repository at this point in the history
flexbox (as well as alternatives such as using grid or tables) are really slow in combination with weasyprint

Backport-of: #4327
  • Loading branch information
stevenbal authored and sergei-maertens committed May 24, 2024
1 parent 7ee7dc1 commit 555e45f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/openforms/scss/pdfs/_submission-step-row.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
@import '~microscope-sass/lib/typography';

.submission-step-row {
display: flex;
justify-content: flex-start;
align-items: flex-start;

& + & {
margin-top: 1mm;
}
Expand Down Expand Up @@ -42,12 +38,17 @@
@include body();
width: 40%;
padding-right: 2em;
// float is used here, because flexbox/grid/tables are really slow with
// weasyprint, especially if large textareas are used
// see: https://github.com/open-formulieren/open-forms/issues/4255
float: left;
}

&__value {
@include body();
width: 60%;
word-break: break-all;
margin-left: 40%;

// wysiwyg content
p {
Expand Down

0 comments on commit 555e45f

Please sign in to comment.