View Single Post
Old 01-23-2022, 09:03 PM   #1
landord01
Junior Member
landord01 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2022
Device: Kobo Libra 2
convert imgage *px to max-height/width

Hi guys,

A book has all its images(over 1 hundred, each with it's own class) defined like:
Code:
.calibre10 {height: 256px, width: 200px}
I want to make them look like:
Code:
 .calibre10 {max-height: 100%, max-width: 90%}
I tried the "transform styles" tool provided by Calibre book editor. like:
change property height to max-height if it's greater than 10px
or
if the property height matches pattern like "height: /\d{2,3}[p][x]/gm" regexpression;
They don't work.

Anyone can help?
landord01 is offline   Reply With Quote