You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HTML writer: depending on unit width/height attributes on image elements are turned into style attributes. But these are not merged with the user's style attribute if there is one. The image tag ends up with two style attributes and the second one (width/height) is ignored.
Pandoc converts pixel height/width attributes on an image to html width/height attributes, but em (and other CSS lengths, I assume) to a style attribute:
At least some browsers ignore the second style attribute, so the width/height has no effect. Also, I believe two styles attributes isn't strictly valid html.
Desired behaviour. The style attributes should be merged (adding a ; separator if needed), which would make the behaviour uniform between px and em values.
The text was updated successfully, but these errors were encountered:
The relevant bit of code in the writer is this. I'm not fluent in Haskell, but perhaps moving consolidateStyles up to the imgAttrsToHtml function would do the trick?
HTML writer: depending on unit width/height attributes on image elements are turned into style attributes. But these are not merged with the user's style attribute if there is one. The image tag ends up with two style attributes and the second one (width/height) is ignored.
Pandoc converts pixel height/width attributes on an image to html width/height attributes, but em (and other CSS lengths, I assume) to a style attribute:
But the
style
attribute isn't merged with the user's own if there is one:At least some browsers ignore the second style attribute, so the width/height has no effect. Also, I believe two styles attributes isn't strictly valid html.
Desired behaviour. The style attributes should be merged (adding a ; separator if needed), which would make the behaviour uniform between
px
andem
values.The text was updated successfully, but these errors were encountered: