You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This layout only uses CSS grid and demonstrates example of the layout I'm trying to recreate with Weasyprint; the previous example mixed in flex.
The title might need to change to reflect the issue more correctly; I'm not exactly sure what the primary issue is.
Overview
The .container is a grid with a single row and column. This represents the page the layout will fill.
The .layout is a grid with a single column and a dynamic number of rows (3 in this example)
Each .row is a grid with a single row, but a number of columns (.cell) equal to the number of children photos/images
The images themselves are set to object-fit: constrain so that they will retain their original aspect ratio, but expand to fill available space.
My expectation is that the layout .row heights adjust to the size of the content, since they will be different sizes depending on the orientation of images on this page.
(Note that I'm hard-coding the grid-template-columns value for the .rows in this example, but I would just use some CSS variables with the template to make this dynamic.)
Here's a view leveraging Chrome's grid inspector:
Chrome Output
Weasyprint Output
I might be missing a few lines of CSS to make this snap into place, but here's the output I'm getting currently.
Overview
.container
is a grid with a single row and column. This represents the page the layout will fill..layout
is a grid with a single column and a dynamic number of rows (3 in this example).row
is a grid with a single row, but a number of columns (.cell
) equal to the number of children photos/imagesobject-fit: constrain
so that they will retain their original aspect ratio, but expand to fill available space.My expectation is that the layout
.row
heights adjust to the size of the content, since they will be different sizes depending on the orientation of images on this page.(Note that I'm hard-coding the
grid-template-columns
value for the.row
s in this example, but I would just use some CSS variables with the template to make this dynamic.)Here's a view leveraging Chrome's grid inspector:
Chrome Output
Weasyprint Output
I might be missing a few lines of CSS to make this snap into place, but here's the output I'm getting currently.
CSS
HTML
The text was updated successfully, but these errors were encountered: