Forum How do I...?

Does Prince support flexbox?

Cuberic
I'm interested in changing up some of my pdf's to use flexbox for the layout and was wondering if prince supports display:flex.
mikeday
No, not at the moment.
Cuberic
Okay, just making sure, thanks for the reply
John
We also are slowly adopting flexbox. What are the plans to support this module? What priority does it have on the roadmap?
mikeday
It's not something we are actively pursuing right at this moment. I would be surprised to see it in the next six months.
joelmeador
+1 from DocRaptor and our customers on this feature. :)
dauwhe
We're finding interesting use cases for flexbox in ebooks. You can ensure a caption remains on the same page as an image, for example. I haven't fully explored how this might work in a fixed-page-size environment.
joelmeador
Seems like you could get something similar with:
element { page-break-inside: avoid; }

But yeah, flexbox is in wide use and the only polyfill I've seen, flexie, doesn't work with prince javascript AFAICT.
nsnsolutions
Ugh. Wish I would have found this post before investing so much time in flexboxes. +1 for flexbox support!
afingret
I'm actually having a layout issue with dynamic vertical content that can only be solved by flexbox.

+1 for Flexbox
jamieappleseed
+1
michaelkoper
+1 for Flexbox!
mikeday
Thank you for all the comments, we will take them into account when scheduling development. :)
Amy
+1 for Flexbox
mikeday
We are beginning our investigation of CSS flexbox layout and would welcome any relevant example documents you might have. In particular there are questions of how page-breaking will interact with flexbox.
joelmeador
More updates from the mines: Flexbox 4 is going to be flexbox-only. Many DocRaptor customers (including DocRaptor itself at several points) are heavy users of flexbox.

I know you are working on it, and bootstrap 4's various test files may be a good exercise for Prince.
mikeday
We have high hopes for January. :)
srlbrooks
Brilliant, ultimately when might this support make its way into a stable release?
mikeday
When it works!
markbrown
The latest build includes support for flexbox. See this thread for details.