This version introduces two new Actions
- 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.
- Expand Styles
This is the same functionality you see when using calibre convert books. It basically expands shorthand properties like margin, padding, border ... etc