styleToAttribute and related functions do not apply for style attributes
Is there a reason why juice not use the informations stored in the style attributes for:
- applyHeightAttributes
- applyWidthAttributes
- styleToAttribute
e.g. <img style="width: 100px"> will remain <img style="width: 100px">.
But
<style>
img {
width: 100px;
}
</style>
<img>
Will become <img style="width: 100px" width="100px">
Or have I overlooked an option there?
The reason I ask is because, when styling e.g. html emails using a WYSIWYG editor like CKEditor, then then most of the styles are applied using the style tag.
If this option does not exists right now then I would suggest to add it.
The reason is that juice is conceived as a way to inline CSS into style tags, so it doesn't currently take any information from style tags and apply them elsewhere. It is a valid point though, so if someone wants to create a PR to update it that would be welcome.
Where does it take the information from to change the CSS and add as HTML attribute?
I am trying to get a CSS background-color to bgcolor on a td?