View Single Post
Old 12-06-2022, 05:41 PM   #13
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,106
Karma: 1954138
Join Date: Aug 2015
Device: Kindle
New Version 0.7.2

This version introduces two new Actions
  1. Inline Styles To CSS
    As the name implies this action convert inline styles to CSS. There are some points to note:
    • For documents that mix inline styles and css, blindingly converting inline styles can mess up the formatting because it can disrupt css rules of specificity, precedence ... etc.
    • However, this action actually tries to avoid this, by resolving the effective style values for every element before and after the conversion. If the results are not the same, the changes are rolled back. The heavy-lifting for resolving the styles is done by calibre code. (Thanks Kovid). Still this validation is done on a best effort basis.
    • By default, if one or more styles are found not to be suitable for conversion to CSS, the action will roll back the changes for all the styles.
    • There is a setting to disable the behavior described above, whereby valid styles are converted to CSS while those not suitable for conversion will remain as inline styles.
    • You can configure this option to exclude some elements using an xpath expression.
    • It is still advisable to double check the changes on documents that have a mix of inline and CSS.
  2. Expand Styles
    This is the same functionality you see when using calibre convert books. It basically expands shorthand properties like margin, padding, border ... etc

Last edited by capink; 12-07-2022 at 12:24 PM.
capink is offline   Reply With Quote