By default, our image size in print is set to max-width = 90%. This works except for the occasional very long graphic.
So to accommodate those, I added a class style img.longfigure, with:
* max-width=auto;
* max-height=90%
This almost works as expected, except that the length of the graphic, even a very thin one, one takes up maybe 60-70% of the length of the page, leaving unused space at the end. Is this because of how max-height is being calculated?
P.
How is max-height in print calculated?
Re: How is max-height in print calculated?
max-width: auto is invalid as there's no auto - so I'm guessing you should use max-width: none
I don't know if that'll fix the problem; but if you currently have a max-width set on the img tag, then it'd be inherited by img.longfigure.
I don't know if that'll fix the problem; but if you currently have a max-width set on the img tag, then it'd be inherited by img.longfigure.
Re: How is max-height in print calculated?
Ah, I had thought it was auto.Dave Lee wrote:max-width: auto is invalid as there's no auto - so I'm guessing you should use max-width: none
I don't know if that'll fix the problem; but if you currently have a max-width set on the img tag, then it'd be inherited by img.longfigure.
I then tried:
* max-width: 90%
* max-height: 90%
Here again, the image doesn't take up the full height allocate and instead its aspect ratio is incorrect.
I then tried both "none" and "inherit" and in both cases the image disappear entirely.
In the end, I went with the not-ideal solution of a hard-coded length for print, height = 20cm.
After that I realised that using height rather than max-height made more sense. But even then, when I use:
* height: 100%;
* width: auto;
...the image only takes up part of the page, not the full length (or width).
So after much trial and error, Flare for some reason doesn't use the length of the actual page to calculate the height of the image. I'm not sure how the height is being calculated.
P/
P.