Thanks for your reply.
Unfortunately, I cannot modify original html.
The initial problem is that sidebar tag is not rendered properly with PD4ML 4.0.9 (yes, I know this is not supported tag, but it worked properly with 3.x version). Section with styles applied are displayed separately from the text inside it (see pdf file attached: text “Hi from sidebar (no styling)” should be inside grey block).
I’ve reported issue about that, but didn’t get a reply yet. Should I provide more details on this issue here?
So, I was looking for a workaround, and the idea was to modify <sidebar>’s internals “on fly”.