mnelson4 / printmyblog

WordPress Plugin that simplifies printing your entire blog
GNU General Public License v3.0
16 stars 6 forks source link

Gutenberg Gallery does not Appear #93

Closed mnelson4 closed 3 years ago

mnelson4 commented 3 years ago

Add a gallery and try to print it with Pro. It doesn't appear using Prince.

Some CSS that helped in browsers:

.pmb-posts .wp-block-gallery{
    overflow:visible;
}
.pmb-posts .wp-block-gallery, .blocks-gallery-grid{
        display:block;
}
.pmb-posts .blocks-gallery-grid .blocks-gallery-item{
    display:block;
    page-break-inside:avoid;
}
.pmb-posts .blocks-gallery-grid .blocks-gallery-item figure{
    display:block;
}
.pmb-posts .blocks-gallery-grid .blocks-gallery-item img{
        margin-right: auto;
        margin-left: auto;
}
mnelson4 commented 3 years ago

the problem is prince has issues with flex and page-breaks: "Prince supports the Flex specification fully, with some limitation regarding page-breaking multiple row/column flex containers." from https://www.princexml.com/doc/styling/#flex-layout

mnelson4 commented 3 years ago

fixed by avoiding using flexbox