View Single Post
Old 08-01-2017, 04:12 AM   #31
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,625
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by DNSB View Post
Personally, I have a mass of image width/height items in my conglomerated stylesheet. After I finish editing a epub, I remove any unused items. Part of my preference is my abhorrence for in-line styles since they make it a total PITA when editing.

Generally, I don't find using a unique value for each image is needed as very often images are repeated (fleurons. flourishes, vignettes, images used with chapter headers, etc.) or the same image size is used for images inserted into chapters.
So at least both of us (not to forget slowsmile) do use percentages to tune our image display. I feel less alone as a portrait man.

There is a common sense way to deal with this:
- if there is an unique percentage width value required for one image, I think it's more handy to use an inline style because you get an immediate control over it. Furthermore, it works faithfully absolutely everywhere (@Hitch, please feel free to tell me if I am wrong).
- if there is a common value for a group of repeated images as DNSB said "(fleurons. flourishes, vignettes, images used with chapter headers, etc.)" it also makes sense to keep this value in the stylesheet.

This is the way I proceed usually: I give first a common value to all images (this can be done also with a CSS class ), and then, when required, go from one individual image to another and correct this value or this class by replacing it with its individual percentage.

I have an example of a book with sixty images. 21 of them will benefit from individual percentages (under 100%) while the remainder are OK with a 100% width. I deal first with all images, giving them all the group percentage (100%), and then for these 21 others I jump from one image to another and change this common value to their individual one.

Whatever may be, I feel there is a need to jump from one image to another every time an image needs an individual percentage. That is the price you have to pay to get a very precise display. That's why it would be very handy:
- if as a minimum Sigil informed me in its report file by calculating which images fall under the "below 100%" percentage. It would do half of the homework.
- ideally if some plugin could automatically insert this individual inline value within the (here 21) images tags which need it. This represents the other half of the homework.

One last remark about "philosophy". I have rather trust my own calculations than rely on the haphazard understanding of various rendering engines in interpreting individual image sizes... I have had too many disappointments on this regard because if anything goes wrong -even a little-, you are unable to correct it easily (at simple view).

Last edited by roger64; 08-01-2017 at 08:21 AM. Reason: homework and "philosophy"
roger64 is offline   Reply With Quote